source: patches/iputils-s20101006-fixes-1.patch @ 578cf221

clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 578cf221 was ecc1136, checked in by Joe Ciccone <jciccone@…>, 13 years ago

Updated IPutils to s20101006.

  • Property mode set to 100644
File size: 5.3 KB
  • iputils-s20101006

    Submitted By: Joe Ciccone <jciccone@gmail.com>
    Date: 2011-01-08
    Initial Package Version: s20100418
    Upstream Status: Unknown
    Origin: Unknown
    Description: Contains Fixes for Various Issues
    
    diff -Naur iputils-s20101006.orig/Makefile iputils-s20101006/Makefile
    old new  
    1616CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
    1717CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES)
    1818
    19 IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
     19IPV4_TARGETS=tracepath ping arping clockdiff
    2020IPV6_TARGETS=tracepath6 traceroute6 ping6
    2121TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
    2222
  • iputils-s20101006

    diff -Naur iputils-s20101006.orig/arping.c iputils-s20101006/arping.c
    old new  
    182182        if (start.tv_sec==0)
    183183                start = tv;
    184184
    185         if (count-- == 0 || (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500))
     185        if (timeout && MS_TDIFF(tv,start) > timeout*1000 + 500)
    186186                finish();
    187187
    188         if (last.tv_sec==0 || MS_TDIFF(tv,last) > 500) {
     188        if ((!timeout) && (count == 0))
     189                finish();
     190
     191        if ( count!=0  && (last.tv_sec==0 || MS_TDIFF(tv,last) > 500 ) ) {
    189192                send_pack(s, src, dst,
    190193                          (struct sockaddr_ll *)&me, (struct sockaddr_ll *)&he);
     194                if (count >= 0)
     195                    count--;
    191196                if (count == 0 && unsolicited)
    192197                        finish();
    193198        }
  • iputils-s20101006

    diff -Naur iputils-s20101006.orig/doc/Makefile iputils-s20101006/doc/Makefile
    old new  
    66
    77html: $(HTMLFILES) iputils.html
    88
    9 man: $(MANFILES)
     9man: $(MANFILES) fix_sgml2man
    1010
    1111# docbook scripts are incredibly dirty in the sense that they leak
    1212# lots of some strange temporary junk directories and files.
     
    3333        @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
    3434        @-rm -rf tmp.db2man
    3535
     36fix_sgml2man:
     37        @sed -i -e 's!\\fB\\fIdestination\\fB\\fR \[\\fB/\\fIport\\fB\\fR\]!\\fB\\fIdestination\\fB\\fR[\\fB/\\fIport\\fB\\fR]!g' tracepath.8
     38
    3639clean:
    3740        @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
    3841
  • doc/docbook2man-spec.pl

    diff -Naur iputils-s20101006.orig/doc/docbook2man-spec.pl iputils-s20101006/doc/docbook2man-spec.pl
    old new  
    428428        output ' ';
    429429
    430430        if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
    431                 output '[ ';
     431                output '[';
    432432        }
    433433        bold_on();
    434434}
     
    441441                font_off();
    442442        }
    443443        if($_[0]->attribute('CHOICE')->value =~ /opt/i) {
    444                 output '] ';
     444                output ']';
    445445        }
    446446}
    447447
  • iputils-s20101006

    diff -Naur iputils-s20101006.orig/ping.c iputils-s20101006/ping.c
    old new  
    250250                        if (argc == 1)
    251251                                options |= F_NUMERIC;
    252252                } else {
    253                         hp = gethostbyname(target);
     253                        hp = gethostbyname2(target, AF_INET);
    254254                        if (!hp) {
    255255                                fprintf(stderr, "ping: unknown host %s\n", target);
    256256                                exit(2);
     
    883883                case ICMP_SR_FAILED:
    884884                        printf("Source Route Failed\n");
    885885                        break;
     886                case ICMP_NET_UNKNOWN:
     887                        printf("Destination Net Unknown\n");
     888                        break;
     889                case ICMP_HOST_UNKNOWN:
     890                        printf("Destination Host Unknown\n");
     891                        break;
     892                case ICMP_HOST_ISOLATED:
     893                        printf("Source Host Isolated\n");
     894                        break;
     895                case ICMP_NET_ANO:
     896                        printf("Destination Net Prohibited\n");
     897                        break;
     898                case ICMP_HOST_ANO:
     899                        printf("Destination Host Prohibited\n");
     900                        break;
     901                case ICMP_NET_UNR_TOS:
     902                        printf("Destination Net Unreachable for Type of Service\n");
     903                        break;
     904                case ICMP_HOST_UNR_TOS:
     905                        printf("Destination Host Unreachable for Type of Service\n");
     906                        break;
    886907                case ICMP_PKT_FILTERED:
    887908                        printf("Packet filtered\n");
    888909                        break;
     910                case ICMP_PREC_VIOLATION:
     911                        printf("Precedence Violation\n");
     912                        break;
     913                case ICMP_PREC_CUTOFF:
     914                        printf("Precedence Cutoff\n");
     915                        break;
    889916                default:
    890917                        printf("Dest Unreachable, Bad Code: %d\n", code);
    891918                        break;
  • iputils-s20101006

    diff -Naur iputils-s20101006.orig/ping_common.c iputils-s20101006/ping_common.c
    old new  
    872872                printf("%spipe %d", comma, pipesize);
    873873                comma = ", ";
    874874        }
    875         if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
     875        if (ntransmitted > 1 && nreceived &&
     876                (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
    876877                int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
    877878                printf("%sipg/ewma %d.%03d/%d.%03d ms",
    878879                       comma, ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
  • iputils-s20101006

    diff -Naur iputils-s20101006.orig/tracepath.c iputils-s20101006/tracepath.c
    old new  
    338338                base_port = atoi(p+1);
    339339        } else
    340340                base_port = 44444;
    341         he = gethostbyname(argv[0]);
     341        he = gethostbyname2(argv[0], AF_INET);
    342342        if (he == NULL) {
    343                 herror("gethostbyname");
     343                herror("gethostbyname2");
    344344                exit(1);
    345345        }
    346346        memcpy(&target.sin_addr, he->h_addr, 4);
Note: See TracBrowser for help on using the repository browser.