]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
fixed bug #37665 ip_canforward operates on address in wrong byte order
authorSimon Goldschmidt <goldsimon@gmx.de>
Tue, 15 Jan 2013 20:10:32 +0000 (21:10 +0100)
committerSimon Goldschmidt <goldsimon@gmx.de>
Tue, 15 Jan 2013 20:10:32 +0000 (21:10 +0100)
CHANGELOG
src/core/ipv4/ip4.c

index da494e4b98290e65d29fab13b743b7dc40ac634c..685b56874d38167fbda867c083175469cff18583 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -80,12 +80,15 @@ HISTORY
 
  ++ Bugfixes:
 
+  2013-01-15: Simon Goldschmidt
+  * ip4.c: fixed bug #37665 ip_canforward operates on address in wrong byte order
+
   2013-01-15: Simon Goldschmidt
   * pbuf.h: fixed bug #38097 pbuf_free_ooseq() warning
+
   2013-01-14: Simon Goldschmidt
   * dns.c: fixed bug #37705 Possible memory corruption in DNS query
+
   2013-01-11: Simon Goldschmidt
   * raw.c: fixed bug #38066 Raw pcbs can alter packet without eating it
 
index 642d32a68e401894bfda39872255dd9cdc15aaf5..4b38999c621b31164e75059a855a807dd8dc8c93 100644 (file)
@@ -153,7 +153,7 @@ ip_route(ip_addr_t *dest)
 static int
 ip_canforward(struct pbuf *p)
 {
-  u32_t addr = ip4_addr_get_u32(ip_current_dest_addr());
+  u32_t addr = htonl(ip4_addr_get_u32(ip_current_dest_addr()));
 
   if (p->flags & PBUF_FLAG_LLBCAST) {
     /* don't route link-layer broadcasts */