summaryrefslogtreecommitdiff
path: root/accel-pppd/libnetlink/iputils.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-04-05 10:47:14 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-04-05 10:47:14 +0300
commitb48a4fb069dc2853088bc6e80f6acbab97a99256 (patch)
treef5a703a187f607f5877d30bb9e5634bbc5a9d727 /accel-pppd/libnetlink/iputils.c
parentb727c912fefac09b0cd6d189eefca89d8a59ceae (diff)
downloadaccel-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.c2
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]);
}