Open growse opened 1 year ago
I guess that zebra API was updated. @irino
i have done some digging. Will try and update this as I go.
The issue seems to be that interfaceNameSize
should not be 20. On my test system, it seems like it should actually be... 16?
Here's some bytes from the interfaceAdd
message body:
Data length is 70 [101 110 115 51 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 5 0 0 0 0 0 1 16 67 0 2 0 0 0 0 0 0 3 232 0 0 5 220 0 0 5 220 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 6 82 84 0 18 52 86 0]
Corresponding ip link
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
altname enp0s3
The name is at the front as you'd expect, but the ifIndex
appears at 0x10
(=2). Then the status at 0x14
(5). If I manugally change interfaceNameSize
to be 16, the interface is correctly parsed, all the waythrough tot he hwaddr.
Where did the value of 20 originally come from?
edit should add that I've worked around this for the moment by downgrading frr to 8.2 and specifying software-name
as "8.2"
Thank you for debugging. I found INTEFACE_NAMSIZ is changed in newer version than frr8.2
FRR8.2:
grep -e IFNAMSIZ -e INTERFACE_NAMSIZ frr-frr-8.2.2/lib/if.h
#define IFNAMSIZ 16
#define IFNAMSIZ 16
#define INTERFACE_NAMSIZ 20
char name[INTERFACE_NAMSIZ];
FRR8.4.2
grep -e IFNAMSIZ -e INTERFACE_NAMSIZ frr-frr-8.4.2/lib/if.h
#define IFNAMSIZ 16
#define IFNAMSIZ 16
#define INTERFACE_NAMSIZ IFNAMSIZ
char name[INTERFACE_NAMSIZ];
INTERFACE_NAMSIZ is originally 20. However recent version is 16.
Problem
Latest gobgpd panics when trying to connect to zebra API. Also reproduced on gobgpd shipped with Debian bookworm (3.10 I think?)
Actual behaviour
Expected behaviour:
gobgpd connects to zebra and communicates routes with
frr
Context
Config:
Versions: