diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-01-30 22:43:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-01-30 22:43:18 +0000 |
commit | 186e1e82c6eb940fd5ddb8bf8caafaec5e7b7424 (patch) | |
tree | 5c17401edb72caf5fb77fcca8cb095042efe0b24 /usr.sbin/traceroute/traceroute.c | |
parent | 38060a534e240914301c04a72f34e0f3a2e07da5 (diff) |
deal with IP_HDRINCL option network byte order change; lidl@va.pubnix.com
Diffstat (limited to 'usr.sbin/traceroute/traceroute.c')
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index da93f7b8411..ab33f769f7f 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -432,7 +432,7 @@ main(argc, argv) ip->ip_dst = gateway[0]; } else ip->ip_dst = to.sin_addr; - ip->ip_off = 0; + ip->ip_off = htons(0); ip->ip_hl = (sizeof(struct ip) + lsrrlen) >> 2; ip->ip_p = IPPROTO_UDP; ip->ip_v = IPVERSION; @@ -618,7 +618,7 @@ send_probe(seq, ttl, to) struct packetdata *op = (struct packetdata *)(up + 1); int i; - ip->ip_len = datalen; + ip->ip_len = htons(datalen); ip->ip_ttl = ttl; ip->ip_id = htons(ident+seq); |