Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
42514625
Commit
42514625
authored
9 years ago
by
Max Neklyudov
Committed by
Gregory Nutt
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Network drivers: Fix bug in tun interface driver. From Max Neklyudov
parent
51f386d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+2
-1
2 additions, 1 deletion
ChangeLog
ReleaseNotes
+8
-3
8 additions, 3 deletions
ReleaseNotes
drivers/net/tun.c
+11
-9
11 additions, 9 deletions
drivers/net/tun.c
include/nuttx/net/tun.h
+3
-1
3 additions, 1 deletion
include/nuttx/net/tun.h
with
24 additions
and
14 deletions
ChangeLog
+
2
−
1
View file @
42514625
...
...
@@ -10831,4 +10831,5 @@
General the MS5805 altimeter driver to support other family
members and rename to ms58xx. From Paul Alexander Patience
(2015-08-14).
* Network drivers. Fix bug in tun interface driver. From Max
Neklyudov (2015-08-17).
This diff is collapsed.
Click to expand it.
ReleaseNotes
+
8
−
3
View file @
42514625
...
...
@@ -9243,11 +9243,16 @@ detailed bugfix information):
NuttX-7.11 Release Notes
------------------------
The 111th release of NuttX, Version 7.11, was made on
June 9,
2015,
The 111th release of NuttX, Version 7.11, was made on
August 13
2015,
and is available for download from the Bitbucket.org website. Note
that release consists of two tarballs: nuttx-7.11.tar.gz and
apps-7.11.tar.gz. Both may be needed (see the top-level nuttx/README.txt
file for build information).
apps-7.11.tar.gz. These are available from:
https://bitbucket.org/patacongo/nuttx/downloads
https://bitbucket.org/nuttx/apps/downloads
Both may be needed (see the top-level nuttx/README.txt file for build
information).
Additional new features and extended functionality:
...
...
This diff is collapsed.
Click to expand it.
drivers/net/tun.c
+
11
−
9
View file @
42514625
...
...
@@ -378,6 +378,7 @@ static int tun_txpoll(struct net_driver_s *dev)
{
/* Send the packet */
priv
->
read_d_len
=
priv
->
dev
.
d_len
;
tun_transmit
(
priv
);
return
1
;
...
...
@@ -511,7 +512,6 @@ static void tun_txdone(FAR struct tun_device_s *priv)
priv
->
dev
.
d_buf
=
priv
->
read_buf
;
(
void
)
devif_poll
(
&
priv
->
dev
,
tun_txpoll
);
priv
->
read_d_len
=
priv
->
dev
.
d_len
;
}
/****************************************************************************
...
...
@@ -537,14 +537,13 @@ static void tun_poll_process(FAR struct tun_device_s *priv)
* the TX poll if he are unable to accept another packet for transmission.
*/
/* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm..
* might be bug here. Does this mean if there is a transmit in progress,
* we will missing TCP time state updates?
*/
if
(
priv
->
read_d_len
==
0
)
{
/* If so, poll uIP for new XMIT data. */
priv
->
dev
.
d_buf
=
priv
->
read_buf
;
(
void
)
devif_timer
(
&
priv
->
dev
,
tun_txpoll
,
TUN_POLLHSEC
);
priv
->
read_d_len
=
priv
->
dev
.
d_len
;
priv
->
dev
.
d_buf
=
priv
->
read_buf
;
(
void
)
devif_timer
(
&
priv
->
dev
,
tun_txpoll
,
TUN_POLLHSEC
);
}
/* Setup the watchdog poll timer again */
...
...
@@ -576,9 +575,13 @@ static void tun_poll_work(FAR void *arg)
/* Perform the poll */
tun_lock
(
priv
);
state
=
net_lock
();
tun_poll_process
(
priv
);
net_unlock
(
state
);
tun_unlock
(
priv
);
}
#endif
...
...
@@ -757,7 +760,6 @@ static int tun_txavail(struct net_driver_s *dev)
priv
->
dev
.
d_buf
=
priv
->
read_buf
;
(
void
)
devif_poll
(
&
priv
->
dev
,
tun_txpoll
);
priv
->
read_d_len
=
priv
->
dev
.
d_len
;
}
net_unlock
(
state
);
...
...
This diff is collapsed.
Click to expand it.
include/nuttx/net/tun.h
+
3
−
1
View file @
42514625
...
...
@@ -56,7 +56,9 @@
/* TUNSETIFF ifr flags */
#define IFF_TUN 0x0001
#define IFF_TUN 0x01
#define IFF_TAP 0x02
#define IFF_NO_PI 0x80
/****************************************************************************
* Public Type Definitions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment