summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2011-07-29 17:13:37 -0700
committerSam Roberts <vieuxtech@gmail.com>2011-07-29 17:13:37 -0700
commit772cfb762ac661cb5a1cf88da480c26a6762d2c3 (patch)
tree05b809b4b3570e4b13f812a48e4f5e7c81e5d971
parentdbedee5dda0ea66e975360aaf020a3ce996e2be0 (diff)
parentea786c2457498e708b0734c233a4292529cc2e2d (diff)
downloadlibnet-772cfb762ac661cb5a1cf88da480c26a6762d2c3.tar.gz
Merge pull request #7 from allfro/patch-1
Fixes a bug that incorrectly converts the addr, mask, and next_hop fields
-rw-r--r--libnet/src/libnet_build_rip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libnet/src/libnet_build_rip.c b/libnet/src/libnet_build_rip.c
index 911d0cf..52a2db7 100644
--- a/libnet/src/libnet_build_rip.c
+++ b/libnet/src/libnet_build_rip.c
@@ -73,9 +73,9 @@ libnet_ptag_t ptag)
rip_hdr.rip_rd = htons(rd);
rip_hdr.rip_af = htons(af);
rip_hdr.rip_rt = htons(rt);
- rip_hdr.rip_addr = htonl(addr);
- rip_hdr.rip_mask = htonl(mask);
- rip_hdr.rip_next_hop = htonl(next_hop);
+ rip_hdr.rip_addr = addr;
+ rip_hdr.rip_mask = mask;
+ rip_hdr.rip_next_hop = next_hop;
rip_hdr.rip_metric = htonl(metric);
n = libnet_pblock_append(l, p, (uint8_t *)&rip_hdr, LIBNET_RIP_H);