| Summary: | SKIP doesn't work on 4.x | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Bob Bishop <rb> |
| Component: | Individual Port(s) | Assignee: | Archie Cobbs <archie> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Bob Bishop
2001-05-12 16:40:00 UTC
Responsible Changed From-To: freebsd-ports->archie over to maintainer The problem is that the id field in incoming IP headers is byte-swapped by the time it reaches skip_auth() in common/skip_ah.c. This blows the MAC calculation out of the water; swapping it back works around the problem. There seems to be no rhyme or reason - it looks as though there's a mix of host and net byte ordered fields in the header when the outgoing MAC calculation is done, and for some reason 4.x (probably current too) delivers packets to the skip module with ip_id swapped wrt what is expected. I'll follow up again with a patch when I've had a dig in RFCs to see if any of this is specified (but I'm not optimistic). -- Bob Bishop (0118) 977 4017 international code +44 118 rb@gid.co.uk fax (0118) 989 4254 The following patch works around the problem, but I believe the raw packet
received by skip should all be in network byte order. On 4.2R at least,
ip_id in the clear header isn't.
--- skip/common/skip_ah.c.orig Wed May 16 16:11:34 2001
+++ skip/common/skip_ah.c Wed May 23 09:02:03 2001
@@ -342,6 +342,8 @@
ip->ip_tos = 0;
ip->ip_off = 0;
+ ip->ip_id = htons(ip->ip_id);
+
/*
* Compute the AH Data
*/
@@ -359,6 +361,8 @@
ip->ip_ttl = ip_ttl;
ip->ip_tos = ip_tos;
ip->ip_off = ip_off;
+
+ ip->ip_id = ntohs(ip->ip_id);
/*
* Now, check if MAC is OK...
--
Bob Bishop +44 (0)118 977 4017
rb@gid.co.uk fax +44 (0)118 989 4254
State Changed From-To: open->closed Patch applied. |