diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-08-26 09:25:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-26 09:25:17 -0400 |
| commit | dec2a1469f83dca34f7b7a00d696b20afe62105a (patch) | |
| tree | 5bcda9d9eefba86bfb4a3a0e7ccab37154ac7728 /zebra/interface.c | |
| parent | 9c24774d7adbea039b369075225b5c6c957d0d66 (diff) | |
| parent | fd267f0808faa24176994ed6d27c095971abdc19 (diff) | |
Merge pull request #4812 from pogojotz/fix-destination-multi-use
zebra: Do not use connection dest for bcast
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index a2f80aff4e..6486c01430 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1081,12 +1081,10 @@ static void connected_dump_vty(struct vty *vty, struct connected *connected) vty_out(vty, "/%d", p->prefixlen); /* If there is destination address, print it. */ - if (connected->destination) { - vty_out(vty, - (CONNECTED_PEER(connected) ? " peer " : " broadcast ")); + if (CONNECTED_PEER(connected) && connected->destination) { + vty_out(vty, " peer "); prefix_vty_out(vty, connected->destination); - if (CONNECTED_PEER(connected)) - vty_out(vty, "/%d", connected->destination->prefixlen); + vty_out(vty, "/%d", connected->destination->prefixlen); } if (CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY)) @@ -2684,12 +2682,6 @@ static int ip_address_install(struct vty *vty, struct interface *ifp, p = prefix_ipv4_new(); *p = pp; ifc->destination = (struct prefix *)p; - } else if (p->prefixlen <= IPV4_MAX_PREFIXLEN - 2) { - p = prefix_ipv4_new(); - *p = lp; - p->prefix.s_addr = ipv4_broadcast_addr(p->prefix.s_addr, - p->prefixlen); - ifc->destination = (struct prefix *)p; } /* Label. */ |
