diff options
Diffstat (limited to 'zebra/rt_socket.c')
| -rw-r--r-- | zebra/rt_socket.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index a6cdffdf32..abcff22b6b 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -213,10 +213,12 @@ static int kernel_rtm(int cmd, const struct prefix *p, } #ifdef __OpenBSD__ - if (nexthop->nh_label - && !kernel_rtm_add_labels(nexthop->nh_label, &smpls)) - continue; - smplsp = (union sockunion *)&smpls; + if (nexthop->nh_label) { + if (kernel_rtm_add_labels(nexthop->nh_label, + &smpls) != 0) + continue; + smplsp = (union sockunion *)&smpls; + } #endif error = rtm_write(cmd, &sin_dest, &sin_mask, gate ? &sin_gate : NULL, smplsp, |
