head 1.2; access; symbols OPENPKG_E1_MP_HEAD:1.2 OPENPKG_E1_MP:1.2 OPENPKG_E1_MP_2_STABLE:1.2.2.2 OPENPKG_E1_FP:1.2.2.2 OPENPKG_2_STABLE_MP:1.2 OPENPKG_2_STABLE_20061018:1.2.2.2 OPENPKG_2_STABLE:1.2.0.2 OPENPKG_CW_FP:1.2 OPENPKG_1_STABLE_MP:1.1; locks; strict; comment @# @; 1.2 date 2004.10.06.19.14.49; author rse; state Exp; branches 1.2.2.1; next 1.1; 1.1 date 2003.07.02.14.54.54; author mlelstv; state Exp; branches; next ; 1.2.2.1 date 2004.10.06.19.14.49; author rse; state dead; branches; next 1.2.2.2; commitid iZxwRSmmWscPXUQr; 1.2.2.2 date 2006.10.16.14.47.57; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.2 log @fix building under gcc 3.4 @ text @--- arpd.c.dist 2003-07-02 16:49:31.000000000 +0200 +++ arpd.c 2003-07-02 16:53:25.000000000 +0200 @@@@ -111,9 +111,11 @@@@ struct in_addr in; ip_addr_t istart, iend; - second = p; + first = p; + second = strchr(p, '-'); + if (second != NULL) + *second++ = '\0'; - first = strsep(&second, "-"); if (second == NULL) errx(1, "%s: Invalid network range: %s", __func__, p); @@@@ -267,7 +267,7 @@@@ spa->addr_ip, tha->addr_eth, tpa->addr_ip); if (op == ARP_OP_REQUEST) { - syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s", + syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__, addr_ntoa(tpa), addr_ntoa(spa)); } else if (op == ARP_OP_REPLY) { syslog(LOG_INFO, "arp reply %s is-at %s", @@@@ -284,7 +284,7 @@@@ int error; if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) { - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr)); return (0); } @@@@ -293,10 +293,10 @@@@ error = arp_get(arpd_arp, &arpent); if (error == -1) { - syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s", + syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__, addr_ntoa(addr)); } else { - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(addr), addr_ntoa(&arpent.arp_ha)); } return (error); @@@@ -425,7 +425,7 @@@@ if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) { addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS, ethip->ar_sha, ETH_ADDR_LEN); - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha)); /* This address is claimed */ @ 1.2.2.1 log @file arpd.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:47:57 +0000 @ text @d1 56 @ 1.2.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 56 --- arpd.c.dist 2003-07-02 16:49:31.000000000 +0200 +++ arpd.c 2003-07-02 16:53:25.000000000 +0200 @@@@ -111,9 +111,11 @@@@ struct in_addr in; ip_addr_t istart, iend; - second = p; + first = p; + second = strchr(p, '-'); + if (second != NULL) + *second++ = '\0'; - first = strsep(&second, "-"); if (second == NULL) errx(1, "%s: Invalid network range: %s", __func__, p); @@@@ -267,7 +267,7 @@@@ spa->addr_ip, tha->addr_eth, tpa->addr_ip); if (op == ARP_OP_REQUEST) { - syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s", + syslog(LOG_DEBUG, "%s: who-has %s tell %s", __FUNCTION__, addr_ntoa(tpa), addr_ntoa(spa)); } else if (op == ARP_OP_REPLY) { syslog(LOG_INFO, "arp reply %s is-at %s", @@@@ -284,7 +284,7 @@@@ int error; if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) { - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr)); return (0); } @@@@ -293,10 +293,10 @@@@ error = arp_get(arpd_arp, &arpent); if (error == -1) { - syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s", + syslog(LOG_DEBUG, "%s: no entry for %s", __FUNCTION__, addr_ntoa(addr)); } else { - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(addr), addr_ntoa(&arpent.arp_ha)); } return (error); @@@@ -425,7 +425,7 @@@@ if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) { addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS, ethip->ar_sha, ETH_ADDR_LEN); - syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s", + syslog(LOG_DEBUG, "%s: %s at %s", __FUNCTION__, addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha)); /* This address is claimed */ @ 1.1 log @avoid new string functions for better compatibility @ text @d17 40 @