From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: rename packages/ to recipes/ per earlier agreement See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- .../net-tools/files/net-tools-1.60-netmask.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 recipes/net-tools/files/net-tools-1.60-netmask.patch (limited to 'recipes/net-tools/files/net-tools-1.60-netmask.patch') diff --git a/recipes/net-tools/files/net-tools-1.60-netmask.patch b/recipes/net-tools/files/net-tools-1.60-netmask.patch new file mode 100644 index 0000000000..532898acaf --- /dev/null +++ b/recipes/net-tools/files/net-tools-1.60-netmask.patch @@ -0,0 +1,61 @@ +--- net-tools-1.60/ifconfig.c.netmask 2001-04-13 20:25:18.000000000 +0200 ++++ net-tools-1.60/ifconfig.c 2004-11-02 15:31:56.454594456 +0100 +@@ -23,6 +23,7 @@ + * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu + * (default AF was wrong) + * 20010404 - Arnaldo Carvalho de Melo, use setlocale ++ * 20040831 - Florin Malita delayed CIDR netmask + */ + + #define DFLT_AF "inet" +@@ -227,13 +228,13 @@ + + int main(int argc, char **argv) + { +- struct sockaddr sa; ++ struct sockaddr sa, sa_netmask; + struct sockaddr_in sin; + char host[128]; + struct aftype *ap; + struct hwtype *hw; + struct ifreq ifr; +- int goterr = 0, didnetmask = 0; ++ int goterr = 0, didnetmask = 0, donetmask = 0; + char **spp; + int fd; + #if HAVE_AFINET6 +@@ -903,16 +904,16 @@ + /* FIXME: sa is too small for INET6 addresses, inet6 should use that too, + broadcast is unexpected */ + if (ap->getmask) { +- switch (ap->getmask(host, &sa, NULL)) { ++ switch (ap->getmask(host, &sa_netmask, NULL)) { + case -1: + usage(); + break; + case 1: + if (didnetmask) + usage(); +- +- goterr = set_netmask(skfd, &ifr, &sa); +- didnetmask++; ++ ++ /* delay setting the CIDR netmask till after setting the addr */ ++ donetmask = 1; + break; + } + } +@@ -960,6 +961,13 @@ + } + } + ++ /* set CIDR netmask */ ++ if (donetmask) { ++ donetmask = 0; ++ goterr = set_netmask(skfd, &ifr, &sa_netmask); ++ didnetmask++; ++ } ++ + /* + * Don't do the set_flag() if the address is an alias with a - at the + * end, since it's deleted already! - Roman -- cgit 1.2.3-korg