From 3fb9cd6ef456959b6eff939d5c316f6785c2dda4 Mon Sep 17 00:00:00 2001 From: hasso Date: Tue, 19 Oct 2004 19:44:43 +0000 Subject: OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd, ripd might need some more testing though. --- zebra/interface.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 5664f41a..a1d0332a 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1107,7 +1107,6 @@ ip_address_install (struct vty *vty, struct interface *ifp, struct prefix_ipv4 cp; struct connected *ifc; struct prefix_ipv4 *p; - struct in_addr mask; int ret; ret = str2prefix_ipv4 (addr_str, &cp); @@ -1129,12 +1128,11 @@ ip_address_install (struct vty *vty, struct interface *ifp, ifc->address = (struct prefix *) p; /* Broadcast. */ - if (p->prefixlen <= 30) + if (p->prefixlen <= IPV4_MAX_PREFIXLEN-2) { p = prefix_ipv4_new (); *p = cp; - masklen2ip (p->prefixlen, &mask); - p->prefix.s_addr |= ~mask.s_addr; + p->prefix.s_addr = ipv4_broadcast_addr(p->prefix.s_addr,p->prefixlen); ifc->destination = (struct prefix *) p; } -- cgit v1.2.1