浏览代码

test_icmp_reply_size: fix for ipv4-only case

Closes: #292
Approved by: whitequark
Astro 6 年之前
父节点
当前提交
e7e267f218
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      .travis.yml
  2. 1 1
      src/iface/ethernet.rs

+ 2 - 0
.travis.yml

@@ -17,6 +17,8 @@ matrix:
       env: FEATURES='std phy-tap_interface proto-ipv6 socket-udp' MODE='test'
       env: FEATURES='std phy-tap_interface proto-ipv6 socket-udp' MODE='test'
     - rust: nightly
     - rust: nightly
       env: FEATURES='std proto-ipv4 proto-igmp socket-raw' MODE='test'
       env: FEATURES='std proto-ipv4 proto-igmp socket-raw' MODE='test'
+    - rust: nightly
+      env: FEATURES='std proto-ipv4 socket-udp socket-tcp' MODE='test'
     - rust: nightly
     - rust: nightly
       env: FEATURES='std proto-ipv6 socket-udp' MODE='test'
       env: FEATURES='std proto-ipv6 socket-udp' MODE='test'
     - rust: nightly
     - rust: nightly

+ 1 - 1
src/iface/ethernet.rs

@@ -2195,7 +2195,7 @@ mod test {
             dst_addr: src_addr,
             dst_addr: src_addr,
             protocol: IpProtocol::Icmp,
             protocol: IpProtocol::Icmp,
             hop_limit: 64,
             hop_limit: 64,
-            payload_len: expected_icmpv4_repr.buffer_len()
+            payload_len: expected_icmp_repr.buffer_len()
         };
         };
 
 
         // The expected packet does not exceed the IPV4_MIN_MTU
         // The expected packet does not exceed the IPV4_MIN_MTU