summaryrefslogtreecommitdiff
path: root/accel-pppd/libnetlink/iputils.c
diff options
context:
space:
mode:
authorDmitriy Eshenko <dmitriy.eshenko@accel-ppp.org>2023-06-29 11:33:57 +0300
committerGitHub <noreply@github.com>2023-06-29 11:33:57 +0300
commit4ffeb255b635d0bd7923c600cb07f7d646b7c3d9 (patch)
treecc71a0aa4d696ac282d38488c5b205c77d828d33 /accel-pppd/libnetlink/iputils.c
parent313551513dcccc500649e9fe5c3177656500d7d8 (diff)
parentca3d2113d3f4f1a662b58bb36d28d677b6f4ba00 (diff)
downloadaccel-ppp-4ffeb255b635d0bd7923c600cb07f7d646b7c3d9.tar.gz
accel-ppp-4ffeb255b635d0bd7923c600cb07f7d646b7c3d9.zip
Merge pull request #85 from louis-6wind/fix-non-vlan-crash
libnetlink: fix a crash with a non vlan interface
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 550717f..23325fc 100644
--- a/accel-pppd/libnetlink/iputils.c
+++ b/accel-pppd/libnetlink/iputils.c
@@ -314,7 +314,7 @@ int __export iplink_vlan_get_vid(int ifindex, int *iflink)
parse_rtattr_nested(tb, IFLA_MAX, tb[IFLA_LINKINFO]);
- if (strcmp(RTA_DATA(tb[IFLA_INFO_KIND]), "vlan"))
+ if (!tb[IFLA_INFO_KIND] || strcmp(RTA_DATA(tb[IFLA_INFO_KIND]), "vlan"))
goto out;
parse_rtattr_nested(tb, IFLA_MAX, tb[IFLA_INFO_DATA]);