From owner-p4-projects@FreeBSD.ORG Thu Aug 24 12:47:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F377416A4E2; Thu, 24 Aug 2006 12:47:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B33F316A4DF for ; Thu, 24 Aug 2006 12:47:06 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AFC343D70 for ; Thu, 24 Aug 2006 12:47:02 +0000 (GMT) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7OCl2iL070899 for ; Thu, 24 Aug 2006 12:47:02 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7OCl2VN070671 for perforce@freebsd.org; Thu, 24 Aug 2006 12:47:02 GMT (envelope-from piso@freebsd.org) Date: Thu, 24 Aug 2006 12:47:02 GMT Message-Id: <200608241247.k7OCl2VN070671@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 104925 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2006 12:47:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=104925 Change 104925 by piso@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 } };