Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
c385d8aa
Commit
c385d8aa
authored
Jul 08, 2015
by
Alessandro Rubini
Committed by
Adam Wujek
Jul 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-unix: fix a problem with ppsi vlans
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
a5a85d39
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
main-loop.c
arch-unix/main-loop.c
+1
-1
main-loop.c
arch-wrs/main-loop.c
+1
-1
unix-socket.c
time-unix/unix-socket.c
+5
-3
No files found.
arch-unix/main-loop.c
View file @
c385d8aa
...
...
@@ -108,7 +108,7 @@ void unix_main_loop(struct pp_globals *ppg)
&
ppi
->
last_rcv_time
);
if
(
i
==
-
2
)
{
continue
;
/* dropped */
continue
;
/* dropped
or not for us
*/
}
if
(
i
==
-
1
)
{
pp_diag
(
ppi
,
frames
,
1
,
...
...
arch-wrs/main-loop.c
View file @
c385d8aa
...
...
@@ -149,7 +149,7 @@ void wrs_main_loop(struct pp_globals *ppg)
&
ppi
->
last_rcv_time
);
if
(
i
==
-
2
)
{
continue
;
/* dropped */
continue
;
/* dropped
or not for us
*/
}
if
(
i
==
-
1
)
{
pp_diag
(
ppi
,
frames
,
1
,
...
...
time-unix/unix-socket.c
View file @
c385d8aa
...
...
@@ -63,8 +63,10 @@ static int unix_recv_msg(struct pp_instance *ppi, int fd, void *pkt, int len,
return
ret
;
}
if
(
msg
.
msg_flags
&
MSG_TRUNC
)
{
/* If we are in VLAN mode, we get everything. This is ok */
if
(
ppi
->
proto
!=
PPSI_PROTO_VLAN
)
pp_error
(
"%s: truncated message
\n
"
,
__func__
);
return
0
;
return
-
2
;
/* like "dropped" */
}
/* get time stamp of packet */
if
(
msg
.
msg_flags
&
MSG_CTRUNC
)
{
...
...
@@ -141,7 +143,7 @@ static int unix_net_recv(struct pp_instance *ppi, void *pkt, int len,
if
(
ret
<=
0
)
return
ret
;
if
(
hdr
->
h_proto
!=
htons
(
ETH_P_1588
))
return
0
;
return
-
2
;
/* like "dropped", so no error message */
memcpy
(
ppi
->
peer
,
hdr
->
h_source
,
ETH_ALEN
);
if
(
pp_diag_allow
(
ppi
,
frames
,
2
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment