Re: svn commit: r216089 - head/sbin/ifconfig
On Wed, 2010-12-01 at 03:24 +, Weongyo Jeong wrote: Author: weongyo Date: Wed Dec 1 03:24:38 2010 New Revision: 216089 URL: http://svn.freebsd.org/changeset/base/216089 Log: Don't print usbus[0-9] interfaces that it's not the interesting interface type for ifconfig(8). Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Tue Nov 30 22:39:46 2010 (r216088) +++ head/sbin/ifconfig/ifconfig.c Wed Dec 1 03:24:38 2010 (r216089) @@ -295,6 +295,8 @@ main(int argc, char *argv[]) sdl = (const struct sockaddr_dl *) ifa-ifa_addr; else sdl = NULL; + if (sdl != NULL sdl-sdl_type == IFT_USB) + continue; if (cp != NULL strcmp(cp, ifa-ifa_name) == 0 !namesonly) continue; iflen = strlcpy(name, ifa-ifa_name, sizeof(name)); I may be misunderstanding, but isn't this more of a hack than the correct solution? I appreciate that there are a large number of defined interface types, but I wonder if we should instead check for interface types we are prepared to accept, rather than skipping ones we know we don't want? Was this issue introduced with the introduction of the USB pcap changes? Thanks, Gavin -- Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r216089 - head/sbin/ifconfig
On Thu, Dec 02, 2010 at 01:19:27PM +, Gavin Atkinson wrote: On Wed, 2010-12-01 at 03:24 +, Weongyo Jeong wrote: Author: weongyo Date: Wed Dec 1 03:24:38 2010 New Revision: 216089 URL: http://svn.freebsd.org/changeset/base/216089 Log: Don't print usbus[0-9] interfaces that it's not the interesting interface type for ifconfig(8). Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Tue Nov 30 22:39:46 2010 (r216088) +++ head/sbin/ifconfig/ifconfig.c Wed Dec 1 03:24:38 2010 (r216089) @@ -295,6 +295,8 @@ main(int argc, char *argv[]) sdl = (const struct sockaddr_dl *) ifa-ifa_addr; else sdl = NULL; + if (sdl != NULL sdl-sdl_type == IFT_USB) + continue; if (cp != NULL strcmp(cp, ifa-ifa_name) == 0 !namesonly) continue; iflen = strlcpy(name, ifa-ifa_name, sizeof(name)); I may be misunderstanding, but isn't this more of a hack than the correct solution? I appreciate that there are a large number of defined interface types, but I wonder if we should instead check for interface types we are prepared to accept, rather than skipping ones we know we don't want? Was this issue introduced with the introduction of the USB pcap changes? We might consider an interface flag for interfaces that aren't configurable in a meaninful way by ifconfig. Then ifconfig wouldn't have to change going forward. -- Brooks pgpGPMy7uCFgc.pgp Description: PGP signature
Re: svn commit: r216089 - head/sbin/ifconfig
On Friday 03 December 2010 10:13 am, Brooks Davis wrote: On Thu, Dec 02, 2010 at 01:19:27PM +, Gavin Atkinson wrote: On Wed, 2010-12-01 at 03:24 +, Weongyo Jeong wrote: Author: weongyo Date: Wed Dec 1 03:24:38 2010 New Revision: 216089 URL: http://svn.freebsd.org/changeset/base/216089 Log: Don't print usbus[0-9] interfaces that it's not the interesting interface type for ifconfig(8). Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c === === --- head/sbin/ifconfig/ifconfig.c Tue Nov 30 22:39:46 2010 (r216088) +++ head/sbin/ifconfig/ifconfig.c Wed Dec 1 03:24:38 2010 (r216089) @@ -295,6 +295,8 @@ main(int argc, char *argv[]) sdl = (const struct sockaddr_dl *) ifa-ifa_addr; else sdl = NULL; + if (sdl != NULL sdl-sdl_type == IFT_USB) + continue; if (cp != NULL strcmp(cp, ifa-ifa_name) == 0 !namesonly) continue; iflen = strlcpy(name, ifa-ifa_name, sizeof(name)); I may be misunderstanding, but isn't this more of a hack than the correct solution? I appreciate that there are a large number of defined interface types, but I wonder if we should instead check for interface types we are prepared to accept, rather than skipping ones we know we don't want? Was this issue introduced with the introduction of the USB pcap changes? We might consider an interface flag for interfaces that aren't configurable in a meaninful way by ifconfig. Then ifconfig wouldn't have to change going forward. +1 Jung-uk Kim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r216089 - head/sbin/ifconfig
Author: weongyo Date: Wed Dec 1 03:24:38 2010 New Revision: 216089 URL: http://svn.freebsd.org/changeset/base/216089 Log: Don't print usbus[0-9] interfaces that it's not the interesting interface type for ifconfig(8). Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Tue Nov 30 22:39:46 2010 (r216088) +++ head/sbin/ifconfig/ifconfig.c Wed Dec 1 03:24:38 2010 (r216089) @@ -295,6 +295,8 @@ main(int argc, char *argv[]) sdl = (const struct sockaddr_dl *) ifa-ifa_addr; else sdl = NULL; + if (sdl != NULL sdl-sdl_type == IFT_USB) + continue; if (cp != NULL strcmp(cp, ifa-ifa_name) == 0 !namesonly) continue; iflen = strlcpy(name, ifa-ifa_name, sizeof(name)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org