PERFORCE change 104925 for review
Paolo Pisati
piso at FreeBSD.org
Thu Aug 24 12:47:07 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104925
Change 104925 by piso at piso_newluxor on 2006/08/24 12:46:15
Depending from which flow/position is called,
AliasHandleUdpNbtNS() gets different parameters:
use 2 different functions for IN/OUT directions
and pass AliasHandleUdpNbtNS() the correct arguments.
Affected files ...
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#7 edit
Differences ...
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#7 (text+ko) ====
@@ -116,7 +116,15 @@
}
static int
-protohandler2(struct libalias *la, struct ip *pip, struct alias_data *ah) {
+protohandler2in(struct libalias *la, struct ip *pip, struct alias_data *ah) {
+
+ AliasHandleUdpNbtNS(la, pip, ah->lnk, ah->aaddr, ah->aport,
+ ah->oaddr, ah->dport);
+ return (0);
+}
+
+static int
+protohandler2out(struct libalias *la, struct ip *pip, struct alias_data *ah) {
AliasHandleUdpNbtNS(la, pip, ah->lnk, &pip->ip_src, ah->sport,
ah->aaddr, ah->aport);
@@ -134,10 +142,17 @@
},
{
.pri = 140,
- .dir = IN|OUT,
+ .dir = IN,
+ .proto = UDP,
+ .fingerprint = &fingerprint2,
+ .protohandler = &protohandler2in
+ },
+ {
+ .pri = 140,
+ .dir = OUT,
.proto = UDP,
.fingerprint = &fingerprint2,
- .protohandler = &protohandler2
+ .protohandler = &protohandler2out
},
{ EOH }
};
More information about the p4-projects
mailing list