diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-08-09 13:04:41 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-21 10:29:37 +0200 |
commit | e4a8065910cd6b2e7e0448cc6431ca2906322389 (patch) | |
tree | 73492991cfa40f994c20d761d476e6bc16304536 /freebsd/sbin | |
parent | Update to FreeBSD head 2017-08-01 (diff) | |
download | rtems-libbsd-e4a8065910cd6b2e7e0448cc6431ca2906322389.tar.bz2 |
Update to FreeBSD head 2017-10-01
Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1.
Update #3472.
Diffstat (limited to 'freebsd/sbin')
-rw-r--r-- | freebsd/sbin/ifconfig/af_link.c | 10 | ||||
-rw-r--r-- | freebsd/sbin/ifconfig/ifconfig.c | 2 | ||||
-rw-r--r-- | freebsd/sbin/ping/ping.c | 22 |
3 files changed, 21 insertions, 13 deletions
diff --git a/freebsd/sbin/ifconfig/af_link.c b/freebsd/sbin/ifconfig/af_link.c index da828d6c..b9ff0a82 100644 --- a/freebsd/sbin/ifconfig/af_link.c +++ b/freebsd/sbin/ifconfig/af_link.c @@ -120,7 +120,15 @@ link_status(int s __unused, const struct ifaddrs *ifa) if (rc != 0) { return; } - if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + + /* + * If this is definitely a lagg device or the hwaddr + * matches the link addr, don't bother. + */ + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, + sdl->sdl_alen) == 0 || + memcmp(ifr.ifr_addr.sa_data, LLADDR(sdl), + sdl->sdl_alen) == 0) { return; } ether_format = ether_ntoa((const struct ether_addr *) diff --git a/freebsd/sbin/ifconfig/ifconfig.c b/freebsd/sbin/ifconfig/ifconfig.c index b61cea48..28da2bef 100644 --- a/freebsd/sbin/ifconfig/ifconfig.c +++ b/freebsd/sbin/ifconfig/ifconfig.c @@ -841,7 +841,7 @@ top: if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0 && (uafp != NULL || errno != EAFNOSUPPORT || (s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0)) - err(1, "socket(family %u,SOCK_DGRAM", ifr.ifr_addr.sa_family); + err(1, "socket(family %u,SOCK_DGRAM)", ifr.ifr_addr.sa_family); while (argc > 0) { p = cmd_lookup(*argv, iscreate); diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c index 96bd410f..e0897962 100644 --- a/freebsd/sbin/ping/ping.c +++ b/freebsd/sbin/ping/ping.c @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include <netinet/ip_var.h> #include <arpa/inet.h> -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER #include <libcasper.h> #include <casper/cap_dns.h> #endif @@ -224,7 +224,7 @@ static volatile sig_atomic_t finish_up; static volatile sig_atomic_t siginfo_p; #endif /* __rtems__ */ -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns; #endif #ifdef __rtems__ @@ -234,7 +234,7 @@ static char hnamebuf[MAXHOSTNAMELEN], snamebuf[MAXHOSTNAMELEN]; static void fill(char *, char *); static u_short in_cksum(u_short *, int); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t *capdns_setup(void); #endif static void check_status(void); @@ -632,7 +632,7 @@ main(int argc, char *const *argv) if (options & F_PINGFILLED) { fill((char *)datap, payload); } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER capdns = capdns_setup(); #endif if (source) { @@ -641,7 +641,7 @@ main(int argc, char *const *argv) if (inet_aton(source, &sock_in.sin_addr) != 0) { shostname = source; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, source, AF_INET); @@ -675,7 +675,7 @@ main(int argc, char *const *argv) if (inet_aton(target, &to->sin_addr) != 0) { hostname = target; } else { -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyname2(capdns, target, AF_INET); else @@ -693,7 +693,7 @@ main(int argc, char *const *argv) hostname = hnamebuf; } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER /* From now on we will use only reverse DNS lookups. */ if (capdns != NULL) { const char *types[1]; @@ -791,7 +791,7 @@ main(int argc, char *const *argv) if (options & F_NUMERIC) cansandbox = true; -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER else if (capdns != NULL) cansandbox = true; #endif @@ -1784,7 +1784,7 @@ pr_addr(struct in_addr ina) if (options & F_NUMERIC) return inet_ntoa(ina); -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER if (capdns != NULL) hp = cap_gethostbyaddr(capdns, (char *)&ina, 4, AF_INET); else @@ -1868,7 +1868,7 @@ fill(char *bp, char *patp) } } -#ifdef HAVE_LIBCASPER +#ifdef WITH_CASPER static cap_channel_t * capdns_setup(void) { @@ -1894,7 +1894,7 @@ capdns_setup(void) return (capdnsloc); } -#endif /* HAVE_LIBCASPER */ +#endif /* WITH_CASPER */ #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) #define SECOPT " [-P policy]" |