Netlink: Better handling of an error case
This commit is contained in:
parent
6fe11c9941
commit
ed6100441e
1 changed files with 7 additions and 7 deletions
|
@ -1419,13 +1419,13 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
|
||||||
if (!nl_parse_attrs(RTM_RTA(i), rtm_attr_want_mpls, a, sizeof(a)))
|
if (!nl_parse_attrs(RTM_RTA(i), rtm_attr_want_mpls, a, sizeof(a)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (a[RTA_DST])
|
if (!a[RTA_DST])
|
||||||
if (rta_get_mpls(a[RTA_DST], rta_mpls_stack) == 1)
|
SKIP("MPLS route without RTA_DST");
|
||||||
net_fill_mpls(&dst, rta_mpls_stack[0]);
|
|
||||||
else
|
if (rta_get_mpls(a[RTA_DST], rta_mpls_stack) != 1)
|
||||||
log(L_WARN "KRT: Got multi-label MPLS RTA_DST");
|
SKIP("MPLS route with multi-label RTA_DST");
|
||||||
else
|
|
||||||
return; /* No support for MPLS routes without RTA_DST */
|
net_fill_mpls(&dst, rta_mpls_stack[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue