summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/inet.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/inet.hh b/base/inet.hh
index 10b782a6c..4f3857a15 100644
--- a/base/inet.hh
+++ b/base/inet.hh
@@ -348,9 +348,9 @@ struct UdpHdr : public udp_hdr
uint16_t sport() const { return ntohs(uh_sport); }
uint16_t dport() const { return ntohs(uh_dport); }
uint16_t len() const { return ntohs(uh_ulen); }
- uint16_t sum() const { return ntohs(uh_sum); }
+ uint16_t sum() const { return uh_sum; }
- void sum(uint16_t sum) { uh_sum = htons(sum); }
+ void sum(uint16_t sum) { uh_sum = sum; }
int size() const { return sizeof(udp_hdr); }
const uint8_t *bytes() const { return (const uint8_t *)this; }