diff options
author | Dmitriy Eshenko <dmitriy.eshenko@accel-ppp.org> | 2023-06-29 11:33:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 11:33:57 +0300 |
commit | 4ffeb255b635d0bd7923c600cb07f7d646b7c3d9 (patch) | |
tree | cc71a0aa4d696ac282d38488c5b205c77d828d33 /accel-pppd/libnetlink | |
parent | 313551513dcccc500649e9fe5c3177656500d7d8 (diff) | |
parent | ca3d2113d3f4f1a662b58bb36d28d677b6f4ba00 (diff) | |
download | accel-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')
-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 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]); |