mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
IP forwarding: A few fixes from early testing; In TUN driver, do all polling on worker thread. Otherwise, the stack gets very deep.
This commit is contained in:
@@ -91,7 +91,7 @@ static int ipv4_hdrsize(FAR struct ipv4_hdr_s *ipv4)
|
||||
case IP_PROTO_TCP:
|
||||
{
|
||||
FAR struct tcp_hdr_s *tcp =
|
||||
(FAR struct tcp_hdr_s *)((FAR uintptr_t *)ipv4 + IPv4_HDRLEN);
|
||||
(FAR struct tcp_hdr_s *)((FAR uint8_t *)ipv4 + IPv4_HDRLEN);
|
||||
unsigned int tcpsize;
|
||||
|
||||
/* The TCP header length is encoded in the top 4 bits of the
|
||||
|
||||
@@ -97,7 +97,7 @@ static int ipv6_hdrsize(FAR struct ipv6_hdr_s *ipv6)
|
||||
case IP_PROTO_TCP:
|
||||
{
|
||||
FAR struct tcp_hdr_s *tcp =
|
||||
(FAR struct tcp_hdr_s *)((FAR uintptr_t *)ipv6 + IPv6_HDRLEN);
|
||||
(FAR struct tcp_hdr_s *)((FAR uint8_t *)ipv6 + IPv6_HDRLEN);
|
||||
unsigned int tcpsize;
|
||||
|
||||
/* The TCP header length is encoded in the top 4 bits of the
|
||||
@@ -337,7 +337,7 @@ static int ipv6_packet_conversion(FAR struct net_driver_s *dev,
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
# define ipv6_packet_conversion(dev, ipv6) (PACKET_NOT_FORWARDED)
|
||||
# define ipv6_packet_conversion(dev, fwddev, ipv6) (PACKET_NOT_FORWARDED)
|
||||
#endif /* CONFIG_NET_6LOWPAN */
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user