Date: Wed, 1 Sep 2004 02:13:28 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 60778 for review Message-ID: <200409010213.i812DSdk085529@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=60778 Change 60778 by peter@peter_melody on 2004/09/01 02:12:27 belated workaround for routing socket abi break. Affected files ... .. //depot/projects/hammer/sbin/ifconfig/ifconfig.c#19 edit .. //depot/projects/hammer/sys/net/if.c#27 edit .. //depot/projects/hammer/sys/net/if.h#13 edit Differences ... ==== //depot/projects/hammer/sbin/ifconfig/ifconfig.c#19 (text+ko) ==== @@ -585,7 +585,10 @@ ifm = (struct if_msghdr *)next; if (ifm->ifm_type == RTM_IFINFO) { - sdl = (struct sockaddr_dl *)(ifm + 1); + if (ifm->ifm_data.ifi_datalen == 0) + ifm->ifm_data.ifi_datalen = sizeof(struct if_data); + sdl = (struct sockaddr_dl *)((char *)ifm + sizeof(struct if_msghdr) - + sizeof(struct if_data) + ifm->ifm_data.ifi_datalen); flags = ifm->ifm_flags; } else { fprintf(stderr, "out of sync parsing NET_RT_IFLIST\n"); ==== //depot/projects/hammer/sys/net/if.c#27 (text+ko) ==== @@ -399,6 +399,7 @@ if_index = ifp->if_index; if (if_index >= if_indexlim) if_grow(); + ifp->if_data.ifi_datalen = sizeof(struct if_data); ifnet_byindex(ifp->if_index) = ifp; ifdev_byindex(ifp->if_index) = make_dev(&net_cdevsw, ==== //depot/projects/hammer/sys/net/if.h#13 (text+ko) ==== @@ -85,6 +85,7 @@ u_char ifi_link_state; /* current link state */ u_char ifi_recvquota; /* polling quota for receive intrs */ u_char ifi_xmitquota; /* polling quota for xmit intrs */ + u_char ifi_datalen; /* length of this data struct */ u_long ifi_mtu; /* maximum transmission unit */ u_long ifi_metric; /* routing metric (external only) */ u_long ifi_baudrate; /* linespeed */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409010213.i812DSdk085529>