You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
982 B
37 lines
982 B
From e212eb214afaea300194333f652b950941299339 Mon Sep 17 00:00:00 2001 |
|
From: Johannes Thumshirn <jthumshirn@suse.de> |
|
Date: Wed, 20 May 2015 16:14:37 +0000 |
|
Subject: [PATCH] l2_linux_packet: correctly process return value of |
|
get_perm_hwaddr |
|
|
|
On success get_perm_hwaddr() returns the number of bytes read from the |
|
netlink socket. |
|
|
|
l2_packet_init() checked for 0 as a successful return value. |
|
|
|
Adopt get_perm_hwaddr() to return 0 on success. |
|
|
|
Refrence: bsc#929171 |
|
|
|
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> |
|
Signed-off-by: John Fastabend <john.r.fastabend@intel.com> |
|
--- |
|
lldp_rtnl.c | 2 ++ |
|
1 file changed, 2 insertions(+) |
|
|
|
diff --git a/lldp_rtnl.c b/lldp_rtnl.c |
|
index 33b4d19..8d4f0cc 100644 |
|
--- a/lldp_rtnl.c |
|
+++ b/lldp_rtnl.c |
|
@@ -322,6 +322,8 @@ int get_perm_hwaddr(const char *ifname, u8 *buf_perm, u8 *buf_san) |
|
|
|
memcpy(buf_perm, RTA_DATA(rta), ETH_ALEN); |
|
memcpy(buf_san, RTA_DATA(rta) + ETH_ALEN, ETH_ALEN); |
|
+ |
|
+ rc = 0; |
|
out: |
|
close(s); |
|
out_nosock: |
|
-- |
|
2.5.5 |
|
|
|
|