diff options
author | hrs <hrs@FreeBSD.org> | 2011-06-16 12:57:33 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2011-06-16 12:57:33 +0000 |
commit | 90aa2cef03ff2efa8e9af771632eb3d02d0df168 (patch) | |
tree | 490da30e581b1db427eed8cad599ad60ed7b443a /usr.sbin/rtadvd/if.c | |
parent | 941fea0834d05ab32f6422648f2ce94a76e13a48 (diff) | |
download | FreeBSD-src-90aa2cef03ff2efa8e9af771632eb3d02d0df168.zip FreeBSD-src-90aa2cef03ff2efa8e9af771632eb3d02d0df168.tar.gz |
- Check RTM_VERSION.
- Fix WARNS.
Diffstat (limited to 'usr.sbin/rtadvd/if.c')
-rw-r--r-- | usr.sbin/rtadvd/if.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/rtadvd/if.c b/usr.sbin/rtadvd/if.c index 302c334..8722a05 100644 --- a/usr.sbin/rtadvd/if.c +++ b/usr.sbin/rtadvd/if.c @@ -105,6 +105,12 @@ if_nametosdl(char *name) lim = buf + len; for (next = buf; next < lim; next += ifm->ifm_msglen) { ifm = (struct if_msghdr *)next; + if (ifm->ifm_version != RTM_VERSION) { + syslog(LOG_ERR, + "<%s> RTM_VERSION mismatch (%d != %d).", + __func__, ifm->ifm_version, RTM_VERSION); + continue; + } if (ifm->ifm_type == RTM_IFINFO) { sa = (struct sockaddr *)(ifm + 1); get_rtaddrs(ifm->ifm_addrs, sa, rti_info); |