OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,
ripd might need some more testing though.
diff --git a/zebra/interface.c b/zebra/interface.c
index 5664f41..a1d0332 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1107,7 +1107,6 @@
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 @@
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;
}