diff --git a/.gitignore b/.gitignore index 2b23d0e..a052a06 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ifenslave.tar.gz /ifenslave.tar.gz /iputils-s20121011.tar.bz2 /iputils-s20121106.tar.bz2 +/iputils-s20121112.tar.bz2 diff --git a/iputils-20020927-addrcache.patch b/iputils-20020927-addrcache.patch deleted file mode 100644 index 188dbca..0000000 --- a/iputils-20020927-addrcache.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- iputils/ping.c.addrcache 2002-09-20 17:08:11.000000000 +0200 -+++ iputils/ping.c 2003-05-15 16:41:19.000000000 +0200 -@@ -1124,6 +1124,12 @@ - { - struct hostent *hp; - static char buf[4096]; -+ static __u32 addr_cache = 0; -+ -+ if ( addr == addr_cache ) -+ return buf; -+ -+ addr_cache = addr; - - if ((options & F_NUMERIC) || - !(hp = gethostbyaddr((char *)&addr, 4, AF_INET))) ---- iputils/ping6.c.addrcache 2002-09-20 17:08:11.000000000 +0200 -+++ iputils/ping6.c 2003-05-15 16:41:19.000000000 +0200 -@@ -893,7 +893,12 @@ - */ - char * pr_addr(struct in6_addr *addr) - { -- struct hostent *hp = NULL; -+ static struct hostent *hp; -+ static struct in6_addr addr_cache; -+ -+ if (memcmp(addr, &addr_cache, sizeof(addr_cache)) == 0) -+ return hp ? hp->h_name : pr_addr_n(addr); -+ memcpy(&addr_cache, addr, sizeof(addr_cache)); - - if (!(options&F_NUMERIC)) - hp = gethostbyaddr((__u8*)addr, sizeof(struct in6_addr), AF_INET6); diff --git a/iputils-20020927-ping-subint.patch b/iputils-20020927-ping-subint.patch index e19e724..2a40fbc 100644 --- a/iputils-20020927-ping-subint.patch +++ b/iputils-20020927-ping-subint.patch @@ -5,7 +5,7 @@ exit(2); } + } else if (icmp_sock >= 0) { -+ /* We possible tried to SO_BINDTODEVICE() a subinterface like 'eth0:1' */ ++ /* We possibly tried to SO_BINDTODEVICE() a subinterface like 'eth0:1' */ + perror("Warning: cannot bind to specified iface, falling back"); } } diff --git a/iputils-20070202-idn.patch b/iputils-20070202-idn.patch deleted file mode 100644 index f765fdf..0000000 --- a/iputils-20070202-idn.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- iputils-s20121106/Makefile.orig 2012-11-06 14:05:19.000000000 +0100 -+++ iputils-s20121106/Makefile 2012-11-06 14:06:42.608585629 +0100 -@@ -62,7 +62,7 @@ - - # ping / ping6 - ping: ping.o ping_common.o -- $(LINK.o) $^ $(LIB_CAP) $(LDLIBS) -o $@ -+ $(LINK.o) $^ -lidn $(LIB_CAP) $(LDLIBS) -o $@ - ping6: ping6.o ping_common.o - $(LINK.o) $^ -lresolv -lcrypto $(LIB_CAP) $(LDLIBS) -o $@ - ping.o ping6.o ping_common.o: ping_common.h -diff -up iputils-s20100418/ping.c.idn iputils-s20100418/ping.c ---- iputils-s20100418/ping.c.idn 2010-04-20 16:07:59.038484302 +0200 -+++ iputils-s20100418/ping.c 2010-04-20 16:07:59.077485007 +0200 -@@ -58,6 +58,9 @@ char copyright[] = - * This program has to run SUID to ROOT to access the ICMP socket. - */ - -+#include -+#include -+ - #include "ping_common.h" - - #include -@@ -123,6 +126,10 @@ main(int argc, char **argv) - char *target, hnamebuf[MAX_HOSTNAMELEN]; - char rspace[3 + 4 * NROUTES + 1]; /* record route space */ - -+ char *idn; -+ int rc = 0; -+ setlocale(LC_ALL, ""); -+ - icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); - socket_errno = errno; - -@@ -250,13 +257,27 @@ main(int argc, char **argv) - if (argc == 1) - options |= F_NUMERIC; - } else { -- hp = gethostbyname(target); -+ rc = idna_to_ascii_lz (target, &idn, 0); -+ if (rc == IDNA_SUCCESS) -+ hp = gethostbyname (idn); -+ else { -+ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", target, rc); -+ exit(2); -+ } -+ free(idn); - if (!hp) { - fprintf(stderr, "ping: unknown host %s\n", target); - exit(2); - } - memcpy(&whereto.sin_addr, hp->h_addr, 4); -- strncpy(hnamebuf, hp->h_name, sizeof(hnamebuf) - 1); -+ rc = idna_to_unicode_lzlz (hp->h_name, &idn, 0); -+ if (rc == IDNA_SUCCESS) -+ strncpy(hnamebuf, idn, sizeof(hnamebuf) - 1); -+ else { -+ fprintf(stderr, "ping: IDN encoding of '%s' failed with error code %d\n", hp->h_name, rc); -+ exit(2); -+ } -+ free(idn); - hnamebuf[sizeof(hnamebuf) - 1] = 0; - hostname = hnamebuf; - } -diff -up iputils-s20100418/ping_common.c.idn iputils-s20100418/ping_common.c ---- iputils-s20100418/ping_common.c.idn 2010-04-20 16:07:59.039478452 +0200 -+++ iputils-s20100418/ping_common.c 2010-04-20 16:07:59.069478660 +0200 -@@ -1,3 +1,5 @@ -+#include -+ - #include "ping_common.h" - #include - #include -@@ -98,6 +100,7 @@ static void fill(char *patp) - - void common_options(int ch) - { -+ setlocale(LC_ALL, "C"); - switch(ch) { - case 'a': - options |= F_AUDIBLE; -@@ -242,6 +245,7 @@ void common_options(int ch) - default: - abort(); - } -+ setlocale(LC_ALL, ""); - } - diff --git a/iputils-20070202-traffic_class.patch b/iputils-20070202-traffic_class.patch deleted file mode 100644 index 8a4ddf0..0000000 --- a/iputils-20070202-traffic_class.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up iputils-s20070202/ping6.c.flowlabel iputils-s20070202/ping6.c ---- iputils-s20070202/ping6.c.flowlabel 2008-02-01 11:10:53.000000000 +0100 -+++ iputils-s20070202/ping6.c 2008-02-01 11:16:47.000000000 +0100 -@@ -86,6 +86,10 @@ char copyright[] = - #define SOL_ICMPV6 IPPROTO_ICMPV6 - #endif - -+#ifndef IVP6_FLOWINFO_SEND -+#define IPV6_FLOWINFO_SEND 33 -+#endif -+ - /* RFC3542 */ - #ifndef ICMP6_DST_UNREACH_BEYONDSCOPE - #define ICMP6_DST_UNREACH_BEYONDSCOPE ICMP6_DST_UNREACH_NOTNEIGHBOR diff --git a/iputils-20071127-corr_type.patch b/iputils-20071127-corr_type.patch index 8246aa6..51906c9 100644 --- a/iputils-20071127-corr_type.patch +++ b/iputils-20071127-corr_type.patch @@ -1,29 +1,30 @@ -diff -up iputils-s20100418/ping.c.corr_type iputils-s20100418/ping.c ---- iputils-s20100418/ping.c.corr_type 2010-04-20 15:42:39.193242030 +0200 -+++ iputils-s20100418/ping.c 2010-04-20 15:42:39.199231317 +0200 -@@ -1211,18 +1211,20 @@ pr_addr(__u32 addr) +--- iputils-s20121112/ping.c.orig 2012-11-13 10:35:16.000000000 +0100 ++++ iputils-s20121112/ping.c 2012-11-13 10:40:38.512144804 +0100 +@@ -1226,12 +1226,14 @@ pr_addr(__u32 addr) + { struct hostent *hp; static char buf[4096]; - static __u32 addr_cache = 0; + struct in_addr tmp_addr; - if ( addr == addr_cache ) - return buf; - - addr_cache = addr; + in_pr_addr = !setjmp(pr_addr_jmp); + tmp_addr.s_addr = addr; - if ((options & F_NUMERIC) || + if (exiting || (options & F_NUMERIC) || !(hp = gethostbyaddr((char *)&addr, 4, AF_INET))) - sprintf(buf, "%s", inet_ntoa(*(struct in_addr *)&addr)); + sprintf(buf, "%s", inet_ntoa(tmp_addr)); - else - snprintf(buf, sizeof(buf), "%s (%s)", hp->h_name, + else { + char *s; + #if USE_IDN +@@ -1241,7 +1243,7 @@ pr_addr(__u32 addr) + s = NULL; + #endif + snprintf(buf, sizeof(buf), "%s (%s)", s ? s : hp->h_name, - inet_ntoa(*(struct in_addr *)&addr)); + inet_ntoa(tmp_addr)); - return(buf); - } - + #if USE_IDN + free(s); + #endif diff -up iputils-s20100418/rdisc.c.corr_type iputils-s20100418/rdisc.c --- iputils-s20100418/rdisc.c.corr_type 2010-04-18 06:45:45.000000000 +0200 +++ iputils-s20100418/rdisc.c 2010-04-20 15:42:39.201230377 +0200 diff --git a/iputils-20071127-infiniband.patch b/iputils-20071127-infiniband.patch deleted file mode 100644 index 56778fc..0000000 --- a/iputils-20071127-infiniband.patch +++ /dev/null @@ -1,280 +0,0 @@ ---- iputils-s20121011/arping.c.orig 2012-10-16 11:31:38.542591530 +0200 -+++ iputils-s20121011/arping.c 2012-10-16 11:31:03.000000000 +0200 -@@ -35,10 +35,6 @@ - #include - #include - --#ifdef USE_SYSFS --#include --#endif -- - #include "SNAPSHOT.h" - - static void usage(void) __attribute__((noreturn)); -@@ -57,14 +53,22 @@ int unicasting; - int s; - int broadcast_only; - --struct sockaddr_storage me; --struct sockaddr_storage he; -+struct sockaddr_ll *me=NULL; -+struct sockaddr_ll *he=NULL; - - struct timeval start, last; - - int sent, brd_sent; - int received, brd_recv, req_recv; - -+#define SYSFS_MNT_PATH "/sys" -+#define SYSFS_CLASS "class" -+#define SYSFS_NET "net" -+#define SYSFS_BROADCAST "broadcast" -+#define SYSFS_PATH_ENV "SYSFS_PATH" -+#define SYSFS_PATH_LEN 256 -+#define SOCKADDR_LEN (2 * sizeof(struct sockaddr_ll)) -+ - #define MS_TDIFF(tv1,tv2) ( ((tv1).tv_sec-(tv2).tv_sec)*1000 + \ - ((tv1).tv_usec-(tv2).tv_usec)/1000 ) - -@@ -171,6 +175,10 @@ void finish(void) - printf("\n"); - fflush(stdout); - } -+ -+ free(me); -+ free(he); -+ - if (dad) - exit(!!received); - if (unsolicited) -@@ -191,8 +199,7 @@ void catcher(void) - finish(); - - if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) { -- send_pack(s, src, dst, -- (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he); -+ send_pack(s, src, dst, me, he); - if (count == 0 && unsolicited) - finish(); - } -@@ -239,7 +246,7 @@ int recv_pack(unsigned char *buf, int le - return 0; - if (ah->ar_pln != 4) - return 0; -- if (ah->ar_hln != ((struct sockaddr_ll *)&me)->sll_halen) -+ if (ah->ar_hln != me->sll_halen) - return 0; - if (len < sizeof(*ah) + 2*(4 + ah->ar_hln)) - return 0; -@@ -250,7 +257,7 @@ int recv_pack(unsigned char *buf, int le - return 0; - if (src.s_addr != dst_ip.s_addr) - return 0; -- if (memcmp(p+ah->ar_hln+4, ((struct sockaddr_ll *)&me)->sll_addr, ah->ar_hln)) -+ if (memcmp(p+ah->ar_hln+4, me->sll_addr, ah->ar_hln)) - return 0; - } else { - /* DAD packet was: -@@ -268,7 +275,7 @@ int recv_pack(unsigned char *buf, int le - */ - if (src_ip.s_addr != dst.s_addr) - return 0; -- if (memcmp(p, ((struct sockaddr_ll *)&me)->sll_addr, ((struct sockaddr_ll *)&me)->sll_halen) == 0) -+ if (memcmp(p, me->sll_addr, me->sll_halen) == 0) - return 0; - if (src.s_addr && src.s_addr != dst_ip.s_addr) - return 0; -@@ -284,7 +291,7 @@ int recv_pack(unsigned char *buf, int le - printf("for %s ", inet_ntoa(dst_ip)); - s_printed = 1; - } -- if (memcmp(p+ah->ar_hln+4, ((struct sockaddr_ll *)&me)->sll_addr, ah->ar_hln)) { -+ if (memcmp(p+ah->ar_hln+4, me->sll_addr, ah->ar_hln)) { - if (!s_printed) - printf("for "); - printf("["); -@@ -310,43 +317,67 @@ int recv_pack(unsigned char *buf, int le - if (quit_on_reply) - finish(); - if(!broadcast_only) { -- memcpy(((struct sockaddr_ll *)&he)->sll_addr, p, ((struct sockaddr_ll *)&me)->sll_halen); -+ memcpy(he->sll_addr, p, me->sll_halen); - unicasting=1; - } - return 1; - } - --void set_device_broadcast(char *device, unsigned char *ba, size_t balen) -+int get_sysfs_mnt_path(char *mnt_path, size_t len) - { --#if USE_SYSFS -- struct sysfs_class_device *dev; -- struct sysfs_attribute *brdcast; -- unsigned char *p; -- int ch; -+ const char *sysfs_path_env; -+ int pth_len=0; - -- dev = sysfs_open_class_device("net", device); -- if (!dev) { -- perror("sysfs_open_class_device(net)"); -- exit(2); -- } -+ if (len == 0 || mnt_path == NULL) -+ return -1; - -- brdcast = sysfs_get_classdev_attr(dev, "broadcast"); -- if (!brdcast) { -- perror("sysfs_get_classdev_attr(broadcast)"); -- exit(2); -- } -+ /* possible overrride of real mount path */ -+ sysfs_path_env = getenv(SYSFS_PATH_ENV); -+ memset(mnt_path, 0, len); -+ strncpy(mnt_path, -+ sysfs_path_env != NULL ? sysfs_path_env : SYSFS_MNT_PATH, -+ len-1); - -- if (sysfs_read_attribute(brdcast)) { -- perror("sysfs_read_attribute"); -- exit(2); -+ if ((pth_len = strlen(mnt_path)) > 0 && mnt_path[pth_len-1] == '/') -+ mnt_path[pth_len-1] = '\0'; -+ -+ return 0; -+} -+ -+int make_sysfs_broadcast_path(char *broadcast_path, size_t len) -+{ -+ char mnt_path[SYSFS_PATH_LEN]; -+ -+ if (get_sysfs_mnt_path(mnt_path, len) != 0) -+ return -1; -+ -+ snprintf(broadcast_path, len, -+ "%s/" SYSFS_CLASS "/" SYSFS_NET "/%s/" SYSFS_BROADCAST, -+ mnt_path, device); -+ -+ return 0; -+} -+ -+char * read_sysfs_broadcast(char *brdcast_path) -+{ -+ int fd; -+ int len_to_read; -+ char *brdcast = NULL; -+ -+ if ((fd = open(brdcast_path, O_RDONLY)) > -1) { -+ len_to_read = lseek(fd, 0L, SEEK_END); -+ if ((brdcast = malloc(len_to_read+1)) != NULL) { -+ lseek(fd, 0L, SEEK_SET); -+ memset(brdcast, 0, len_to_read+1); -+ if (read(fd, brdcast, len_to_read) == -1) { -+ free(brdcast); -+ brdcast = NULL; -+ } -+ } -+ close(fd); - } - -- for (p = ba, ch = 0; p < ba + balen; p++, ch += 3) -- *p = strtoul(brdcast->value + ch, NULL, 16); --#else -- memset(ba, -1, balen); --#endif -- return; -+ return brdcast; - } - - int -@@ -375,6 +406,17 @@ main(int argc, char **argv) - } - #endif - -+ me = malloc(SOCKADDR_LEN); -+ if (!me) { -+ fprintf(stderr, "arping: could not allocate memory\n"); -+ exit(1); -+ } -+ he = malloc(SOCKADDR_LEN); -+ if (!he) { -+ fprintf(stderr, "arping: could not allocate memory\n"); -+ exit(1); -+ } -+ - while ((ch = getopt(argc, argv, "h?bfDUAqc:w:s:I:V")) != EOF) { - switch(ch) { - case 'b': -@@ -523,31 +565,48 @@ main(int argc, char **argv) - close(probe_fd); - }; - -- ((struct sockaddr_ll *)&me)->sll_family = AF_PACKET; -- ((struct sockaddr_ll *)&me)->sll_ifindex = ifindex; -- ((struct sockaddr_ll *)&me)->sll_protocol = htons(ETH_P_ARP); -- if (bind(s, (struct sockaddr*)&me, sizeof(me)) == -1) { -+ me->sll_family = AF_PACKET; -+ me->sll_ifindex = ifindex; -+ me->sll_protocol = htons(ETH_P_ARP); -+ if (bind(s, (struct sockaddr*)me, SOCKADDR_LEN) == -1) { - perror("bind"); - exit(2); - } - - if (1) { -- socklen_t alen = sizeof(me); -- if (getsockname(s, (struct sockaddr*)&me, &alen) == -1) { -+ socklen_t alen = SOCKADDR_LEN; -+ if (getsockname(s, (struct sockaddr*)me, &alen) == -1) { - perror("getsockname"); - exit(2); - } - } -- if (((struct sockaddr_ll *)&me)->sll_halen == 0) { -+ if (me->sll_halen == 0) { - if (!quiet) - printf("Interface \"%s\" is not ARPable (no ll address)\n", device); - exit(dad?0:2); - } - -- he = me; -+ memcpy(he, me, SOCKADDR_LEN); -+ -+ char brdcast_path[SYSFS_PATH_LEN]; -+ char *brdcast_val=NULL; -+ char *next_ch; -+ -+ if (make_sysfs_broadcast_path(brdcast_path, sizeof brdcast_path) != 0) { -+ perror("sysfs attribute broadcast"); -+ exit(2); -+ } -+ -+ if ((brdcast_val = read_sysfs_broadcast(brdcast_path)) == NULL) { -+ perror("sysfs read broadcast value"); -+ exit(2); -+ } -+ -+ for (ch=0; chsll_halen; ch++) { -+ he->sll_addr[ch] = strtol(brdcast_val + (ch*3), &next_ch, 16); -+ } - -- set_device_broadcast(device, ((struct sockaddr_ll *)&he)->sll_addr, -- ((struct sockaddr_ll *)&he)->sll_halen); -+ free(brdcast_val); - - if (!quiet) { - printf("ARPING %s ", inet_ntoa(dst)); ---- iputils-s20121106/Makefile.orig 2012-11-06 14:07:24.000000000 +0100 -+++ iputils-s20121106/Makefile 2012-11-06 14:07:51.394624700 +0100 -@@ -31,11 +31,6 @@ - LIB_CAP = -lcap - endif - --ifneq ($(USE_SYSFS),no) -- DEFINES += -DUSE_SYSFS -- LIB_SYSFS = -lsysfs --endif -- - # ------------------------------------- - IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd - IPV6_TARGETS=tracepath6 traceroute6 ping6 diff --git a/iputils-20100418-flowlabel.patch b/iputils-20100418-flowlabel.patch deleted file mode 100644 index 6f65363..0000000 --- a/iputils-20100418-flowlabel.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -up iputils-s20100418/in6_flowlabel.h.flowlabel iputils-s20100418/in6_flowlabel.h ---- iputils-s20100418/in6_flowlabel.h.flowlabel 2010-05-17 13:54:03.422586206 +0200 -+++ iputils-s20100418/in6_flowlabel.h 2010-05-17 13:54:03.422586206 +0200 -@@ -0,0 +1,40 @@ -+/* -+ It is just a stripped copy of the kernel header "linux/in6.h" -+ -+ "Flow label" things are still not defined in "netinet/in*.h" headers, -+ but we cannot use "linux/in6.h" immediately because it currently -+ conflicts with "netinet/in.h" . -+*/ -+ -+struct in6_flowlabel_req -+{ -+ struct in6_addr flr_dst; -+ __u32 flr_label; -+ __u8 flr_action; -+ __u8 flr_share; -+ __u16 flr_flags; -+ __u16 flr_expires; -+ __u16 flr_linger; -+ __u32 __flr_pad; -+ /* Options in format of IPV6_PKTOPTIONS */ -+}; -+ -+#define IPV6_FL_A_GET 0 -+#define IPV6_FL_A_PUT 1 -+#define IPV6_FL_A_RENEW 2 -+ -+#define IPV6_FL_F_CREATE 1 -+#define IPV6_FL_F_EXCL 2 -+ -+#define IPV6_FL_S_NONE 0 -+#define IPV6_FL_S_EXCL 1 -+#define IPV6_FL_S_PROCESS 2 -+#define IPV6_FL_S_USER 3 -+#define IPV6_FL_S_ANY 255 -+ -+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff -+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000 -+ -+#define IPV6_FLOWLABEL_MGR 32 -+#define IPV6_FLOWINFO_SEND 33 -+ ---- iputils-s20121106/Makefile.orig 2012-11-06 14:09:00.000000000 +0100 -+++ iputils-s20121106/Makefile 2012-11-06 14:09:30.983678824 +0100 -@@ -60,7 +60,7 @@ - $(LINK.o) $^ -lidn $(LIB_CAP) $(LDLIBS) -o $@ - ping6: ping6.o ping_common.o - $(LINK.o) $^ -lresolv -lcrypto $(LIB_CAP) $(LDLIBS) -o $@ --ping.o ping6.o ping_common.o: ping_common.h -+ping.o ping6.o ping_common.o: ping_common.h in6_flowlabel.h - - # rarpd - -diff -up iputils-s20100418/ping6.c.flowlabel iputils-s20100418/ping6.c ---- iputils-s20100418/ping6.c.flowlabel 2010-05-17 13:55:34.012839691 +0200 -+++ iputils-s20100418/ping6.c 2010-05-17 13:55:36.411557280 +0200 -@@ -74,6 +74,7 @@ char copyright[] = - #include - - #include "ping6_niquery.h" -+#include "in6_flowlabel.h" - - #ifndef SOL_IPV6 - #define SOL_IPV6 IPPROTO_IPV6 diff --git a/iputils-20101006-eth.patch b/iputils-20101006-eth.patch index 475e872..daf15fe 100644 --- a/iputils-20101006-eth.patch +++ b/iputils-20101006-eth.patch @@ -1,6 +1,6 @@ ---- iputils-s20121011/arping.c.orig 2012-10-16 11:46:12.000000000 +0200 -+++ iputils-s20121011/arping.c 2012-10-16 11:49:09.746673028 +0200 -@@ -40,7 +40,7 @@ +--- iputils-s20121112/arping.c.orig 2012-11-13 12:12:51.000000000 +0100 ++++ iputils-s20121112/arping.c 2012-11-13 12:15:11.514261164 +0100 +@@ -50,7 +50,7 @@ static void usage(void) __attribute__((noreturn)); int quit_on_reply=0; @@ -9,20 +9,19 @@ int ifindex; char *source; struct in_addr src, dst; -@@ -69,6 +69,11 @@ int received, brd_recv, req_recv; - #define SYSFS_PATH_LEN 256 - #define SOCKADDR_LEN (2 * sizeof(struct sockaddr_ll)) +@@ -71,6 +71,10 @@ struct timeval start, last; + int sent, brd_sent; + int received, brd_recv, req_recv; -+#define PREF_ETH "eth" -+#define PREF_EM "em" -+ ++#define PREF_ETH "eth" ++#define PREF_EM "em" +static char *dev_file = "/proc/self/net/dev"; + - #define MS_TDIFF(tv1,tv2) ( ((tv1).tv_sec-(tv2).tv_sec)*1000 + \ - ((tv1).tv_usec-(tv2).tv_usec)/1000 ) - -@@ -380,6 +385,46 @@ char * read_sysfs_broadcast(char *brdcas - return brdcast; + #ifndef CAPABILITIES + static uid_t euid; + #endif +@@ -524,6 +528,46 @@ static void set_device_broadcast(char *d + return; } +/* @@ -68,16 +67,16 @@ int main(int argc, char **argv) { -@@ -417,6 +462,8 @@ main(int argc, char **argv) - exit(1); - } +@@ -543,6 +587,8 @@ main(int argc, char **argv) + + disable_capability_raw(); + device = get_first_ethernet(); + while ((ch = getopt(argc, argv, "h?bfDUAqc:w:s:I:V")) != EOF) { switch(ch) { case 'b': -@@ -443,6 +490,10 @@ main(int argc, char **argv) +@@ -569,6 +615,10 @@ main(int argc, char **argv) timeout = atoi(optarg); break; case 'I': diff --git a/iputils-20101006-man.patch b/iputils-20101006-man.patch deleted file mode 100644 index 9e24649..0000000 --- a/iputils-20101006-man.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -up iputils-s20101006/doc/ping.sgml.man iputils-s20101006/doc/ping.sgml ---- iputils-s20101006/doc/ping.sgml.man 2011-03-29 08:53:09.362500777 +0200 -+++ iputils-s20101006/doc/ping.sgml 2011-03-29 08:58:03.196423782 +0200 -@@ -62,8 +62,8 @@ Audible ping. -