commit 3f28faf1a984ae611bc37ff9b9cdd21071df771b Author: Stephen Hemminger <shemminger@dxpl.pdx.osdl.net> Date: Tue Jul 11 16:02:37 2006 -0700 If addif fails report whether bridge or interface doesn't exist. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348617 diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c index 67aaad4..a05d5b1 100644 --- a/brctl/brctl_cmd.c +++ b/brctl/brctl_cmd.c @@ -96,7 +96,10 @@ static int br_cmd_addif(int argc, char * continue; case ENODEV: - fprintf(stderr, "interface %s does not exist!\n", ifname); + if (if_nametoindex(ifname) == 0) + fprintf(stderr, "interface %s does not exist!\n", ifname); + else + fprintf(stderr, "bridge %s does not exist\n", brname); break; case EBUSY: