arpd/arpd.patch

Thu, 04 Oct 2012 20:26:02 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:26:02 +0200
changeset 714
119553d296d2
child 715
c10fb90893b9
permissions
-rw-r--r--

Import package vendor original spec for necessary manipulations.

michael@714 1 --- arpd.c.dist 2003-07-02 16:49:31.000000000 +0200
michael@714 2 +++ arpd.c 2003-07-02 16:53:25.000000000 +0200
michael@714 3 @@ -111,9 +111,11 @@
michael@714 4 struct in_addr in;
michael@714 5 ip_addr_t istart, iend;
michael@714 6
michael@714 7 - second = p;
michael@714 8 + first = p;
michael@714 9 + second = strchr(p, '-');
michael@714 10 + if (second != NULL)
michael@714 11 + *second++ = '\0';
michael@714 12
michael@714 13 - first = strsep(&second, "-");
michael@714 14 if (second == NULL)
michael@714 15 errx(1, "%s: Invalid network range: %s",
michael@714 16 __func__, p);
michael@714 17 @@ -267,7 +267,7 @@
michael@714 18 spa->addr_ip, tha->addr_eth, tpa->addr_ip);
michael@714 19
michael@714 20 if (op == ARP_OP_REQUEST) {
michael@714 21 - syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s",
michael@714 22 + syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__,
michael@714 23 addr_ntoa(tpa), addr_ntoa(spa));
michael@714 24 } else if (op == ARP_OP_REPLY) {
michael@714 25 syslog(LOG_INFO, "arp reply %s is-at %s",
michael@714 26 @@ -284,7 +284,7 @@
michael@714 27 int error;
michael@714 28
michael@714 29 if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) {
michael@714 30 - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
michael@714 31 + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
michael@714 32 addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr));
michael@714 33 return (0);
michael@714 34 }
michael@714 35 @@ -293,10 +293,10 @@
michael@714 36 error = arp_get(arpd_arp, &arpent);
michael@714 37
michael@714 38 if (error == -1) {
michael@714 39 - syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s",
michael@714 40 + syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__,
michael@714 41 addr_ntoa(addr));
michael@714 42 } else {
michael@714 43 - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
michael@714 44 + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
michael@714 45 addr_ntoa(addr), addr_ntoa(&arpent.arp_ha));
michael@714 46 }
michael@714 47 return (error);
michael@714 48 @@ -425,7 +425,7 @@
michael@714 49 if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) {
michael@714 50 addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS,
michael@714 51 ethip->ar_sha, ETH_ADDR_LEN);
michael@714 52 - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
michael@714 53 + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__,
michael@714 54 addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha));
michael@714 55
michael@714 56 /* This address is claimed */

mercurial