From owner-p4-projects@FreeBSD.ORG Wed Sep 1 02:13:29 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB8F016A4D1; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F4FD16A4CE for ; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7424843D31 for ; Wed, 1 Sep 2004 02:13:28 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i812DS5D085532 for ; Wed, 1 Sep 2004 02:13:28 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i812DSdk085529 for perforce@freebsd.org; Wed, 1 Sep 2004 02:13:28 GMT (envelope-from peter@freebsd.org) Date: Wed, 1 Sep 2004 02:13:28 GMT Message-Id: <200409010213.i812DSdk085529@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 60778 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 02:13:29 -0000 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 */