Skip to content

Commit

Permalink
drivers: eth: native_posix: Fix malformed echo response
Browse files Browse the repository at this point in the history
Native POSIX echo server sends malformed response to echo request of
size larger than 128 bytes (default size of each network data
fragment). Wireshark notices that by tagging echo request with "No
response seen". This commit fixes that issue.

Signed-off-by: Ruslan Mstoi <[email protected]>
  • Loading branch information
Ruslan Mstoi authored and nashif committed May 31, 2018
1 parent dcb0ac1 commit 29b7cdc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/ethernet/eth_native_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static inline struct net_if *get_iface(struct eth_context *ctx,
static int read_data(struct eth_context *ctx, int fd)
{
u16_t vlan_tag = NET_VLAN_TAG_UNSPEC;
int count = 0;
struct net_if *iface;
struct net_pkt *pkt;
struct net_buf *frag;
Expand All @@ -167,8 +168,6 @@ static int read_data(struct eth_context *ctx, int fd)
}

do {
int count = 0;

frag = net_pkt_get_frag(pkt, NET_BUF_TIMEOUT);
if (!frag) {
net_pkt_unref(pkt);
Expand Down

0 comments on commit 29b7cdc

Please sign in to comment.