diff options
Diffstat (limited to 'pbrd/pbr_zebra.c')
| -rw-r--r-- | pbrd/pbr_zebra.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index 4e5b5f3dde..cdacfad4b4 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -60,7 +60,8 @@ struct pbr_interface *pbr_if_new(struct interface *ifp) return 0; } - return (pbr_ifp); + ifp->info = pbr_ifp; + return pbr_ifp; } /* Inteface addition message from zebra. */ @@ -74,12 +75,8 @@ static int interface_add(int command, struct zclient *zclient, if (!ifp) return 0; - if (!ifp->info) { - struct pbr_interface *pbr_ifp; - - pbr_ifp = pbr_if_new(ifp); - ifp->info = pbr_ifp; - } + if (!ifp->info) + pbr_if_new(ifp); return 0; } @@ -482,6 +479,7 @@ static void pbr_encode_pbr_map_sequence(struct stream *s, stream_putw(s, 0); /* src port */ pbr_encode_pbr_map_sequence_prefix(s, pbrms->dst, family); stream_putw(s, 0); /* dst port */ + stream_putl(s, 0); /* fwmark */ if (pbrms->nhgrp_name) stream_putl(s, pbr_nht_get_table(pbrms->nhgrp_name)); else if (pbrms->nhg) @@ -494,7 +492,7 @@ void pbr_send_pbr_map(struct pbr_map_sequence *pbrms, { struct pbr_map *pbrm = pbrms->parent; struct stream *s; - uint64_t is_installed = 1 << pmi->install_bit; + uint64_t is_installed = (uint64_t)1 << pmi->install_bit; is_installed &= pbrms->installed; |
