[-]
[+]
|
Changed |
radvd.changes
|
|
[-]
[+]
|
Changed |
radvd.spec
^
|
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/CHANGES
^
|
@@ -1,3 +1,17 @@
+2013/10/02 releasing 1.9.5
+ minor fix in IPv6 forwarding setting check <akarl10>
+
+2013/10/01 releasing 1.9.4
+
+2013/09/24 Added a Makefile target to generate hashes and a gpg signature
+
+2013/09/07 Netlink processing fix <Nathan Hintz>
+ Correction in IPv6 forwarding setting check <Anand Kumria>
+ fix for kernels with no NETLINK_NO_ENOBUFS defined <Sedat Dilek>
+
+2013/04/13 Force UnicodeOnly if IFF_MULTICAST is unavailable
+ Remove check for IFF_BROADCAST since it isn't used
+
2013/03/14 Fix for systems without sysctl.h from vapier
Updating to version 1.9.3
release 1.9.3
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/Makefile.am
^
|
@@ -126,6 +126,54 @@
-e 's,@''LOG_FACILITY''@,$(LOG_FACILITY),g' \
$< > $@
+
+EXTENSIONS = gz bz2 lz lzma xz tarZ shar zip
+HASHES = md5 sha1 sha256
+
+sign:
+ $(AM_V_GEN)for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ for h in $(HASHES); do \
+ $${h}sum radvd-$(VERSION).tar.$$e > radvd-$(VERSION).tar.$$e.$$h; \
+ done; \
+ gpg -sba radvd-$(VERSION).tar.$$e; \
+ fi; \
+ done
+
+verify:
+ $(AM_V_GEN)for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ for h in $(HASHES); do \
+ $${h}sum -c radvd-$(VERSION).tar.$$e.$$h; \
+ done; \
+ gpg --verify radvd-$(VERSION).tar.$$e.asc; \
+ fi; \
+ done
+
+html:
+ $(AM_V_GEN)echo "<ul>"; \
+ for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ echo "<li>"; \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e\">radvd-$(VERSION).tar.$$e</a>"; \
+ for h in $(HASHES); do \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.$$h\">[$$h]</a>"; \
+ done; \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.asc\">[GPG]</a>"; \
+ echo "</li>"; \
+ fi; \
+ done; \
+ echo "</ul>"
+
+packages:
+ $(MAKE) dist-bzip2
+ $(MAKE) dist-gzip
+ $(MAKE) dist-xz
+ $(MAKE) sign
+ $(MAKE) verify
+ $(MAKE) html
+
+
dist-hook:
rm -f $(distdir)/gram.c
rm -f $(distdir)/gram.h
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/Makefile.in
^
|
@@ -380,6 +380,8 @@
scanner.c
SUFFIXES = .man
+EXTENSIONS = gz bz2 lz lzma xz tarZ shar zip
+HASHES = md5 sha1 sha256
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1113,8 +1115,6 @@
dvi-am:
-html: html-am
-
html-am:
info: info-am
@@ -1203,6 +1203,49 @@
-e 's,@''LOG_FACILITY''@,$(LOG_FACILITY),g' \
$< > $@
+sign:
+ $(AM_V_GEN)for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ for h in $(HASHES); do \
+ $${h}sum radvd-$(VERSION).tar.$$e > radvd-$(VERSION).tar.$$e.$$h; \
+ done; \
+ gpg -sba radvd-$(VERSION).tar.$$e; \
+ fi; \
+ done
+
+verify:
+ $(AM_V_GEN)for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ for h in $(HASHES); do \
+ $${h}sum -c radvd-$(VERSION).tar.$$e.$$h; \
+ done; \
+ gpg --verify radvd-$(VERSION).tar.$$e.asc; \
+ fi; \
+ done
+
+html:
+ $(AM_V_GEN)echo "<ul>"; \
+ for e in $(EXTENSIONS); do \
+ if [ -f radvd-$(VERSION).tar.$$e ]; then \
+ echo "<li>"; \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e\">radvd-$(VERSION).tar.$$e</a>"; \
+ for h in $(HASHES); do \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.$$h\">[$$h]</a>"; \
+ done; \
+ echo "<a href=\"dist/radvd-$(VERSION).tar.$$e.asc\">[GPG]</a>"; \
+ echo "</li>"; \
+ fi; \
+ done; \
+ echo "</ul>"
+
+packages:
+ $(MAKE) dist-bzip2
+ $(MAKE) dist-gzip
+ $(MAKE) dist-xz
+ $(MAKE) sign
+ $(MAKE) verify
+ $(MAKE) html
+
dist-hook:
rm -f $(distdir)/gram.c
rm -f $(distdir)/gram.h
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/VERSION
^
|
@@ -1,5 +1,6 @@
#
+# This file is automatically processed by configure
#
-# this file is automatically processed by configure
+# If adding rcX, be sure to separate with a '-'
#
-1.9.3
+1.9.5
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/device-bsd44.c
^
|
@@ -26,7 +26,7 @@
* the defined prefixes
*/
int
-setup_deviceinfo(struct Interface *iface)
+update_device_info(struct Interface *iface)
{
struct ifaddrs *addresses = 0, *ifa;
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/device-common.c
^
|
@@ -39,6 +39,7 @@
flog(LOG_ERR, "interface %s is not UP", iface->Name);
return (-1);
}
+
if (!(ifr.ifr_flags & IFF_RUNNING))
{
if (!iface->IgnoreIfMissing)
@@ -46,18 +47,10 @@
return (-1);
}
- if (! iface->UnicastOnly && !(ifr.ifr_flags & IFF_MULTICAST))
- {
- flog(LOG_WARNING, "interface %s does not support multicast",
- iface->Name);
- flog(LOG_WARNING, " do you need to add the UnicastOnly flag?");
- }
-
- if (! iface->UnicastOnly && !(ifr.ifr_flags & IFF_BROADCAST))
+ if (!iface->UnicastOnly && !(ifr.ifr_flags & IFF_MULTICAST))
{
- flog(LOG_WARNING, "interface %s does not support broadcast",
- iface->Name);
- flog(LOG_WARNING, " do you need to add the UnicastOnly flag?");
+ flog(LOG_INFO, "interface %s does not support multicast, forcing UnicastOnly", iface->Name);
+ iface->UnicastOnly = 1;
}
return 0;
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/device-linux.c
^
|
@@ -28,7 +28,7 @@
* the defined prefixes
*/
int
-setup_deviceinfo(struct Interface *iface)
+update_device_info(struct Interface *iface)
{
struct ifreq ifr;
struct AdvPrefix *prefix;
@@ -37,8 +37,8 @@
strncpy(ifr.ifr_name, iface->Name, IFNAMSIZ-1);
ifr.ifr_name[IFNAMSIZ-1] = '\0';
- if (ioctl(sock, SIOCGIFMTU, &ifr) < 0) {
- flog(LOG_ERR, "ioctl(SIOCGIFMTU) failed for %s: %s",
+ if (ioctl(sock, SIOCGIFMTU | SIOCGIFHWADDR, &ifr) < 0) {
+ flog(LOG_ERR, "ioctl() failed for %s: %s",
iface->Name, strerror(errno));
return (-1);
}
@@ -46,13 +46,6 @@
dlog(LOG_DEBUG, 3, "mtu for %s is %d", iface->Name, ifr.ifr_mtu);
iface->if_maxmtu = ifr.ifr_mtu;
- if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0)
- {
- flog(LOG_ERR, "ioctl(SIOCGIFHWADDR) failed for %s: %s",
- iface->Name, strerror(errno));
- return (-1);
- }
-
dlog(LOG_DEBUG, 3, "hardware type for %s is %d", iface->Name,
ifr.ifr_hwaddr.sa_family);
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/gram.y
^
|
@@ -177,7 +177,7 @@
ABORT;
}
}
- if (setup_deviceinfo(iface) < 0)
+ if (update_device_info(iface) < 0)
if (!iface->IgnoreIfMissing)
ABORT;
if (check_iface(iface) < 0)
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/netlink.c
^
|
@@ -41,7 +41,10 @@
struct msghdr msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
struct nlmsghdr *nh;
struct ifinfomsg * ifinfo;
+ struct rtattr *rta;
+ int rta_len;
char ifname[IF_NAMESIZE] = {""};
+ int reloaded = 0;
len = recvmsg (sock, &msg, 0);
if (len == -1) {
@@ -59,15 +62,26 @@
}
/* Continue with parsing payload. */
- ifinfo = NLMSG_DATA(nh);
- if_indextoname(ifinfo->ifi_index, ifname);
- if (ifinfo->ifi_flags & IFF_RUNNING) {
- dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is running", ifname, ifinfo->ifi_index);
+ if (nh->nlmsg_type == RTM_NEWLINK || nh->nlmsg_type == RTM_DELLINK || nh->nlmsg_type == RTM_SETLINK) {
+ ifinfo = (struct ifinfomsg *)NLMSG_DATA(nh);
+ if_indextoname(ifinfo->ifi_index, ifname);
+ rta = IFLA_RTA(NLMSG_DATA(nh));
+ rta_len = nh->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifinfomsg));
+ for (; RTA_OK(rta, rta_len); rta = RTA_NEXT(rta, rta_len)) {
+ if (rta->rta_type == IFLA_OPERSTATE || rta->rta_type == IFLA_LINKMODE) {
+ if (ifinfo->ifi_flags & IFF_RUNNING) {
+ dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is running", ifname, ifinfo->ifi_index);
+ }
+ else {
+ dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index);
+ }
+ if (!reloaded) {
+ reload_config();
+ reloaded = 1;
+ }
+ }
+ }
}
- else {
- dlog(LOG_DEBUG, 3, "%s, ifindex %d, flags is *NOT* running", ifname, ifinfo->ifi_index);
- }
- reload_config();
}
}
@@ -81,10 +95,11 @@
if (sock == -1) {
flog(LOG_ERR, "Unable to open netlink socket: %s", strerror(errno));
}
+#if defined SOL_NETLINK && defined NETLINK_NO_ENOBUFS
else if (setsockopt(sock, SOL_NETLINK, NETLINK_NO_ENOBUFS, &val, sizeof(val)) < 0 ) {
flog(LOG_ERR, "Unable to setsockopt NETLINK_NO_ENOBUFS: %s", strerror(errno));
}
-
+#endif
memset(&snl, 0, sizeof(snl));
snl.nl_family = AF_NETLINK;
snl.nl_groups = RTMGRP_LINK;
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/radvd.c
^
|
@@ -43,6 +43,10 @@
" -t, --chrootdir=PATH Chroot to the specified path.\n"
" -u, --username=USER Switch to the specified user.\n"
" -n, --nodaemon Prevent the daemonizing.\n"
+#ifdef HAVE_NETLINK
+" -L, --disablenetlink Disable netlink feature\n"
+#endif
+" -I, --disableigmp6check Disable igmp6 check before send\n"
" -v, --version Print the version and quit.\n"
};
@@ -60,6 +64,10 @@
{"help", 0, 0, 'h'},
{"singleprocess", 0, 0, 's'},
{"nodaemon", 0, 0, 'n'},
+#ifdef HAVE_NETLINK
+ {"disablenetlink", 0, 0, 'L'},
+#endif
+ {"disableigmp6check", 0, 0, 'I'},
{NULL, 0, 0, 0}
};
@@ -77,6 +85,10 @@
char *pidfile = NULL;
char *pname;
int sock = -1;
+#ifdef HAVE_NETLINK
+int disablenetlink = 0;
+#endif
+int disableigmp6check = 0;
volatile int sighup_received = 0;
volatile int sigterm_received = 0;
@@ -193,6 +205,14 @@
case 'n':
daemonize = 0;
break;
+#ifdef HAVE_NETLINK
+ case 'L':
+ disablenetlink = 1;
+ break;
+#endif
+ case 'I':
+ disableigmp6check = 1;
+ break;
case 'h':
usage();
#ifdef HAVE_GETOPT_LONG
@@ -370,8 +390,13 @@
fds[0].revents = 0;
#if HAVE_NETLINK
- fds[1].fd = netlink_socket();
- fds[1].events = POLLIN;
+ if (!disablenetlink) {
+ fds[1].fd = netlink_socket();
+ fds[1].events = POLLIN;
+ } else{
+ fds[1].fd = -1;
+ fds[1].events = 0;
+ }
fds[1].revents = 0;
#else
fds[1].fd = -1;
@@ -419,11 +444,12 @@
}
}
#ifdef HAVE_NETLINK
- if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) {
- flog(LOG_WARNING, "socket error on fds[1].fd");
- }
- else if (fds[1].revents & POLLIN) {
- process_netlink_msg(fds[1].fd);
+ if (!disablenetlink) {
+ if (fds[1].revents & (POLLERR | POLLHUP | POLLNVAL)) {
+ flog(LOG_WARNING, "socket error on fds[1].fd");
+ } else if (fds[1].revents & POLLIN) {
+ process_netlink_msg(fds[1].fd);
+ }
}
#endif
}
@@ -796,11 +822,26 @@
}
#endif
- if (value != 1 && !warned) {
+#ifdef __linux__
+ /* Linux allows the forwarding value to be either 1 or 2.
+ * https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/ip-sysctl.txt?id=ae8abfa00efb8ec550f772cbd1e1854977d06212#n1078
+ *
+ * The value 2 indicates forwarding is enabled and that *AS* *WELL* router solicitions are being done.
+ *
+ * Which is sometimes used on routers performing RS on their WAN (ppp, etc.) links
+ */
+ if (!warned && value != 1 && value != 2) {
+ warned = 1;
+ flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be 1 or 2", value);
+ return(-1);
+ }
+#else
+ if (!warned && value != 1) {
warned = 1;
flog(LOG_DEBUG, "IPv6 forwarding setting is: %u, should be 1", value);
return(-1);
}
+#endif /* __linux__ */
return(0);
}
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/radvd.h
^
|
@@ -25,6 +25,8 @@
extern int sock;
+extern int disableigmp6check;
+
#define min(a,b) (((a) < (b)) ? (a) : (b))
struct AdvPrefix;
@@ -195,7 +197,7 @@
int expired(struct Interface const * iface);
/* device.c */
-int setup_deviceinfo(struct Interface *);
+int update_device_info(struct Interface *);
int check_device(struct Interface *);
int setup_linklocal_addr(struct Interface *);
int setup_allrouters_membership(struct Interface *);
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/redhat/radvd.spec
^
|
@@ -5,7 +5,7 @@
Summary: A Router Advertisement daemon
Name: radvd
-Version: 1.9.3
+Version: 1.9.5
Release: 1
# The code includes the advertising clause, so it's GPL-incompatible
License: BSD with advertising
|
[-]
[+]
|
Changed |
radvd-1.9.5.tar.bz2/send.c
^
|
@@ -128,6 +128,9 @@
size_t len = 0;
ssize_t err;
+
+ update_device_info(iface);
+
/* First we need to check that the interface hasn't been removed or deactivated */
if(check_device(iface) < 0) {
if (iface->IgnoreIfMissing) /* a bit more quiet warning message.. */
@@ -154,7 +157,7 @@
}
/* Make sure that we've joined the all-routers multicast group */
- if (check_allrouters_membership(iface) < 0)
+ if (!disableigmp6check && check_allrouters_membership(iface) < 0)
flog(LOG_WARNING, "problem checking all-routers membership on %s", iface->Name);
dlog(LOG_DEBUG, 3, "sending RA on %s", iface->Name);
|