intel / openlldp

Other
54 stars 42 forks source link

Two bug fixes #30

Closed apconole closed 5 years ago

apconole commented 5 years ago

First is a fix to the lldp_util routine when pulling address information.

Second is a fix to the ecp22 module under error conditions.

Neither has been tested thoroughly.

apconole commented 5 years ago

@praeluceo any comments?

praeluceo commented 5 years ago

Good morning Aaron, apologies for the delay in responding. We have this in validation, however we may need to only perform a regression test on it. Do you have testing hints, or a tracking Bugzilla we can use in validation against this patch?

apconole commented 5 years ago

Yes - for the ifaddr:

Program terminated with signal 11, Segmentation fault.

0 0x0000562b97f6dbcc in get_saddr6 (ifname=ifname@entry=0x562b993d97c0 "vethfd5c38f1", saddr=saddr@entry=0x7ffed42e4870) at lldp_util.c:1043

1043 if ((ifa->ifa_addr->sa_family == AF_INET6) && (gdb) bt

0 0x0000562b97f6dbcc in get_saddr6 (ifname=ifname@entry=0x562b993d97c0 "vethfd5c38f1", saddr=saddr@entry=0x7ffed42e4870) at lldp_util.c:1043

1 0x0000562b97f6dc71 in get_ipaddr6 (ifname=ifname@entry=0x562b993d97c0 "vethfd5c38f1", in6=in6@entry=0x7ffed42e48e2) at lldp_util.c:1060

2 0x0000562b97f6e863 in mand_bld_portid_tlv (md=md@entry=0x562b993d97c0, agent=0x562b993d8a60) at lldp_mand.c:382

3 0x0000562b97f6ec85 in mand_bld_tlv (md=md@entry=0x562b993d97c0, agent=agent@entry=0x562b993d8a60) at lldp_mand.c:475

4 0x0000562b97f6f17c in mand_ifup (ifname=0x7ffed42e4cf0 "vethfd5c38f1", agent=0x562b993d8a60) at lldp_mand.c:606

5 0x0000562b97f555a5 in oper_add_device (device_name=device_name@entry=0x7ffed42e4cf0 "vethfd5c38f1") at event_iface.c:218

6 0x0000562b97f55f0e in event_if_decode_nlmsg (len=, data=0x7ffed42e4d10, route_type=16) at event_iface.c:313

7 event_if_process_recvmsg (nlmsg=0x7ffed42e4d00) at event_iface.c:334

8 event_iface_receive (sock=, eloop_ctx=, sock_ctx=) at event_iface.c:412

9 0x0000562b97f56504 in eloop_sock_table_dispatch (table=table@entry=0x562b981acbf0 <eloop+16>, fds=fds@entry=0x562b993d3140) at eloop.c:209

10 0x0000562b97f56c73 in eloop_run () at eloop.c:526

11 0x0000562b97f512ea in main (argc=, argv=) at lldpad.c:459

(gdb) p ifa $1 = (struct ifaddrs ) 0x55a64c323f18 (gdb) p ifa->ifa_addr $2 = (struct sockaddr ) 0x0

For the ecp22 fix (this is from some automated tool):

1 ecp22_start /usr/sbin/lldpad 0x3cc3a Build id: 6965d7a0bd89816fd46ad52524763484c03576ff -
2 evb22_timer /usr/sbin/lldpad 0x39a0a Build id: 6965d7a0bd89816fd46ad52524763484c03576ff -
3 timer /usr/sbin/lldpad 0x17eea Build id: 6965d7a0bd89816fd46ad52524763484c03576ff -
4 eloop_run /usr/sbin/lldpad 0xbc2f Build id: 6965d7a0bd89816fd46ad52524763484c03576ff -
5 main /usr/sbin/lldpad 0x62ca Build id: 6965d7a0bd89816fd46ad52524763484c03576ff
apconole commented 5 years ago

Updated.

praeluceo commented 5 years ago

Thanks! We'll get it reevaluated.

On Tue, Aug 20, 2019, 09:52 Aaron Conole notifications@github.com wrote:

Updated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intel/openlldp/pull/30?email_source=notifications&email_token=AACR3NF77EH246QOOMRXOOTQFQONJA5CNFSM4IIKECKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4W6JFY#issuecomment-523101335, or mute the thread https://github.com/notifications/unsubscribe-auth/AACR3NEZCEZMLIUJY6AHIHLQFQONJANCNFSM4IIKECKA .

apconole commented 5 years ago

Anything else preventing merge? Customers are hitting these errors, so I'd like to get it merged so we can deliver fixes (rather than rely on custom hotfix builds).