On Thu, Dec 06, 2018 at 09:54:32PM +0800, Hangbin Liu wrote: > This patch add team interface activebackup mode support. As linux team use > genl netlink message, when we get a rtnl link change notify, we have to setup > a new genl socket and request the current active port.
I ran some tests with this patch. When the team interface was not configured with the activebackup runner, ptp4l refused to start as expected. It started after configuring the interface to use activebackup. When I forced it to switch to another port by setting the active link down (I'm not sure if that is the proper way to do it), ptp4l crashes on start. # ptp4l -m -i nm-team ptp4l[270.472]: selected /dev/ptp3 as PTP clock ptp4l[270.472]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[270.473]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE Segmentation fault (core dumped) 0x0000000000418666 in rtnl_link_status (fd=16, device=0x636df8 "nm-team", cb=0x414736 <port_link_status>, ctx=0x63a300) at rtnl.c:251 251 for ( ; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) { (gdb) bt #0 0x0000000000418666 in rtnl_link_status (fd=16, device=0x636df8 "nm-team", cb=0x414736 <port_link_status>, ctx=0x63a300) at rtnl.c:251 #1 0x0000000000414dd1 in bc_event (p=0x63a300, fd_index=10) at port.c:2549 #2 0x0000000000414a6d in port_event (p=0x63a300, fd_index=10) at port.c:2475 #3 0x00000000004066c5 in clock_poll (c=0x632680 <the_clock>) at clock.c:1512 #4 0x000000000040257c in main (argc=4, argv=0x7fffffffd8d8) at ptp4l.c:253 (gdb) print nh $1 = (struct nlmsghdr *) 0xf7e7b950 (gdb) print len $2 = 142329956 -- Miroslav Lichvar _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel