diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-04-05 10:47:14 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-04-05 10:47:14 +0300 |
commit | b48a4fb069dc2853088bc6e80f6acbab97a99256 (patch) | |
tree | f5a703a187f607f5877d30bb9e5634bbc5a9d727 /accel-pppd/libnetlink/iputils.c | |
parent | b727c912fefac09b0cd6d189eefca89d8a59ceae (diff) | |
download | accel-ppp-b48a4fb069dc2853088bc6e80f6acbab97a99256.tar.gz accel-ppp-b48a4fb069dc2853088bc6e80f6acbab97a99256.zip |
iputils: check for IFLA_INFO_KIND presence
Diffstat (limited to 'accel-pppd/libnetlink/iputils.c')
-rw-r--r-- | accel-pppd/libnetlink/iputils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/libnetlink/iputils.c b/accel-pppd/libnetlink/iputils.c index ee536744..7ba288ef 100644 --- a/accel-pppd/libnetlink/iputils.c +++ b/accel-pppd/libnetlink/iputils.c @@ -90,7 +90,7 @@ static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void * if (tb[IFLA_LINKINFO]) { parse_rtattr_nested(tb2, IFLA_MAX, tb[IFLA_LINKINFO]); - if (!strcmp(RTA_DATA(tb2[IFLA_INFO_KIND]), "vlan")) { + if (tb2[IFLA_INFO_KIND] && !strcmp(RTA_DATA(tb2[IFLA_INFO_KIND]), "vlan")) { parse_rtattr_nested(tb2, IFLA_MAX, tb2[IFLA_INFO_DATA]); vid = *(uint16_t *)RTA_DATA(tb2[IFLA_VLAN_ID]); } |