Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
469df055
Commit
469df055
authored
Jul 05, 2012
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tom's fix to the packet filter makes it possible for BOOTP to work... and now it does.
parent
63ac3c7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ep_pfilter.c
dev/ep_pfilter.c
+5
-0
bootp.c
lib/bootp.c
+0
-1
No files found.
dev/ep_pfilter.c
View file @
469df055
...
@@ -246,6 +246,11 @@ void pfilter_init_default()
...
@@ -246,6 +246,11 @@ void pfilter_init_default()
pfilter_logic3
(
14
,
1
,
AND
,
6
,
OR
,
5
);
/* r14 = ARP(broadcast) or PTPv2 */
pfilter_logic3
(
14
,
1
,
AND
,
6
,
OR
,
5
);
/* r14 = ARP(broadcast) or PTPv2 */
pfilter_logic3
(
15
,
10
,
AND
,
7
,
OR
,
14
);
/* r15 = ICMP/IP(unicast) or ARP(broadcast) or PTPv2 */
pfilter_logic3
(
15
,
10
,
AND
,
7
,
OR
,
14
);
/* r15 = ICMP/IP(unicast) or ARP(broadcast) or PTPv2 */
/* Ethernet = 14 bytes, IPv4 = 20 bytes, offset to dport: 2 = 36/2 = 18 */
pfilter_cmp
(
18
,
0x0044
,
0xffff
,
MOV
,
14
);
/* r14 = 1 when dport = BOOTPC */
pfilter_logic3
(
14
,
14
,
AND
,
8
,
AND
,
11
);
/* r14 = BOOTP/UDP/IP(unicast|broadcast) */
pfilter_logic2
(
15
,
14
,
OR
,
15
);
/* r15 = BOOTP/UDP/IP(unicast|broadcast) or ICMP/IP(unicast) or ARP(broadcast) or PTPv2 */
pfilter_logic3
(
20
,
11
,
AND
,
8
,
OR
,
15
);
/* r16 = Something we accept */
pfilter_logic3
(
20
,
11
,
AND
,
8
,
OR
,
15
);
/* r16 = Something we accept */
pfilter_logic2
(
R_DROP
,
20
,
NOT
,
0
);
/* None match? drop */
pfilter_logic2
(
R_DROP
,
20
,
NOT
,
0
);
/* None match? drop */
...
...
lib/bootp.c
View file @
469df055
...
@@ -127,7 +127,6 @@ int process_bootp(uint8_t* buf, int len)
...
@@ -127,7 +127,6 @@ int process_bootp(uint8_t* buf, int len)
uint8_t
mac
[
6
];
uint8_t
mac
[
6
];
get_mac_addr
(
mac
);
get_mac_addr
(
mac
);
mprintf
(
"recvd: %d %x %d %d %d
\n
"
,
len
,
buf
[
IP_VERSION
],
buf
[
IP_PROTOCOL
],
buf
[
UDP_DPORT
+
1
],
buf
[
UDP_SPORT
+
1
]);
if
(
len
!=
BOOTP_END
)
return
0
;
if
(
len
!=
BOOTP_END
)
return
0
;
if
(
buf
[
IP_VERSION
]
!=
0x45
)
return
0
;
if
(
buf
[
IP_VERSION
]
!=
0x45
)
return
0
;
...
...
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