arpd/arpd.patch

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

mercurial