summaryrefslogtreecommitdiff
path: root/networking/traceroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 1462543f1..adb9ef0b4 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -1118,7 +1118,7 @@ traceroute_main(int argc, char *argv[])
1118 xsetgid(getgid()); 1118 xsetgid(getgid());
1119 xsetuid(getuid()); 1119 xsetuid(getuid());
1120 1120
1121 outip = (struct ip *)xzalloc(packlen); 1121 outip = xzalloc(packlen);
1122 1122
1123 outip->ip_v = IPVERSION; 1123 outip->ip_v = IPVERSION;
1124 if (tos_str) 1124 if (tos_str)
@@ -1133,7 +1133,6 @@ traceroute_main(int argc, char *argv[])
1133#if ENABLE_FEATURE_TRACEROUTE_USE_ICMP 1133#if ENABLE_FEATURE_TRACEROUTE_USE_ICMP
1134 if (useicmp) { 1134 if (useicmp) {
1135 outip->ip_p = IPPROTO_ICMP; 1135 outip->ip_p = IPPROTO_ICMP;
1136
1137 outicmp = (struct icmp *)outp; 1136 outicmp = (struct icmp *)outp;
1138 outicmp->icmp_type = ICMP_ECHO; 1137 outicmp->icmp_type = ICMP_ECHO;
1139 outicmp->icmp_id = htons(ident); 1138 outicmp->icmp_id = htons(ident);
@@ -1142,7 +1141,6 @@ traceroute_main(int argc, char *argv[])
1142#endif 1141#endif
1143 { 1142 {
1144 outip->ip_p = IPPROTO_UDP; 1143 outip->ip_p = IPPROTO_UDP;
1145
1146 outudp = (struct udphdr *)outp; 1144 outudp = (struct udphdr *)outp;
1147 outudp->source = htons(ident); 1145 outudp->source = htons(ident);
1148 outudp->len = htons((uint16_t)(packlen - (sizeof(*outip) + optlen))); 1146 outudp->len = htons((uint16_t)(packlen - (sizeof(*outip) + optlen)));