diff options
Diffstat (limited to 'zebra/if_ioctl.c')
| -rw-r--r-- | zebra/if_ioctl.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c index cc348fc237..73da049655 100644 --- a/zebra/if_ioctl.c +++ b/zebra/if_ioctl.c @@ -14,10 +14,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <zebra.h> @@ -105,12 +104,13 @@ interface_list_ioctl (void) #ifdef OPEN_BSD for (n = 0; n < ifconf.ifc_len; ) { - int size; + unsigned int size; ifreq = (struct ifreq *)((caddr_t) ifconf.ifc_req + n); ifp = if_get_by_name_len(ifreq->ifr_name, strnlen(ifreq->ifr_name, - sizeof(ifreq->ifr_name))); + sizeof(ifreq->ifr_name)), + VRF_DEFAULT, 0); if_add_update (ifp); size = ifreq->ifr_addr.sa_len; if (size < sizeof (ifreq->ifr_addr)) @@ -123,7 +123,8 @@ interface_list_ioctl (void) { ifp = if_get_by_name_len(ifreq->ifr_name, strnlen(ifreq->ifr_name, - sizeof(ifreq->ifr_name))); + sizeof(ifreq->ifr_name)), + VRF_DEFAULT, 0); if_add_update (ifp); ifreq++; } @@ -201,7 +202,7 @@ if_getaddrs (void) continue; } - ifp = if_lookup_by_name (ifap->ifa_name); + ifp = if_lookup_by_name (ifap->ifa_name, VRF_DEFAULT); if (ifp == NULL) { zlog_err ("if_getaddrs(): Can't lookup interface %s\n", @@ -244,7 +245,6 @@ if_getaddrs (void) connected_add_ipv4 (ifp, flags, &addr->sin_addr, prefixlen, dest_pnt, NULL); } -#ifdef HAVE_IPV6 if (ifap->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6 *addr; @@ -289,7 +289,6 @@ if_getaddrs (void) connected_add_ipv6 (ifp, flags, &addr->sin6_addr, prefixlen, dest_pnt, NULL); } -#endif /* HAVE_IPV6 */ } freeifaddrs (ifapfree); @@ -336,9 +335,9 @@ interface_list (struct zebra_ns *zns) if_getaddrs (); -#if defined(HAVE_IPV6) && defined(HAVE_PROC_NET_IF_INET6) +#if defined(HAVE_PROC_NET_IF_INET6) /* Linux provides interface's IPv6 address via /proc/net/if_inet6. */ ifaddr_proc_ipv6 (); -#endif /* HAVE_IPV6 && HAVE_PROC_NET_IF_INET6 */ +#endif /* HAVE_PROC_NET_IF_INET6 */ } |
