diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/irdp_main.c | 4 | ||||
-rw-r--r-- | zebra/zebra_routemap.c | 11 | ||||
-rw-r--r-- | zebra/zserv.c | 4 |
3 files changed, 8 insertions, 11 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c index c297979c..0658c397 100644 --- a/zebra/irdp_main.c +++ b/zebra/irdp_main.c @@ -29,7 +29,7 @@ */ /* - * Thanks to Jens Låås at Swedish University of Agricultural Sciences + * Thanks to Jens L��s at Swedish University of Agricultural Sciences * for reviewing and tests. */ @@ -108,7 +108,7 @@ irdp_sock_init (void) return ret; }; - ret = setsockopt_ifindex (AF_INET, sock, 1); + ret = setsockopt_pktinfo (AF_INET, sock, 1); if (ret < 0) { zlog_warn ("IRDP: can't do irdp sockopt %s", safe_strerror(errno)); close(sock); diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 808dcf74..b3111b8e 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -642,17 +642,14 @@ route_set_src (void *rule, struct prefix *prefix, static void * route_set_src_compile (const char *arg) { - sa_family_t family; union g_addr src, *psrc; - if (inet_pton(AF_INET, arg, &src.ipv4) > 0) - family = AF_INET; + if (inet_pton(AF_INET, arg, &src.ipv4) != 1 #ifdef HAVE_IPV6 - else if (inet_pton(AF_INET6, arg, &src.ipv6) > 0) - family = AF_INET6; + && inet_pton(AF_INET6, arg, &src.ipv6) != 1 #endif /* HAVE_IPV6 */ - else - return NULL; + ) + return NULL; psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr)); *psrc = src; diff --git a/zebra/zserv.c b/zebra/zserv.c index dc3d432b..398b74c8 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1360,8 +1360,8 @@ zebra_serv () #endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); - sockopt_reuseaddr (accept_sock); - sockopt_reuseport (accept_sock); + setsockopt_reuseaddr (accept_sock); + setsockopt_reuseport (accept_sock); if ( zserv_privs.change(ZPRIVS_RAISE) ) zlog (NULL, LOG_ERR, "Can't raise privileges"); |