[ipfilter-cvs] ipfilter/tools ipnat_y.y,
Brought to you by:
darren_r
From: Darren <dar...@us...> - 2012-08-25 14:11:22
|
Update of /cvsroot/ipfilter/ipfilter/tools In directory vz-cvs-4.sog:/tmp/cvs-serv20197/tools Modified Files: ipnat_y.y Log Message: 3561691 gethost never returns an ipv6 address Index: ipnat_y.y =================================================================== RCS file: /cvsroot/ipfilter/ipfilter/tools/ipnat_y.y,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ipnat_y.y 22 Jul 2012 08:02:23 -0000 1.33 --- ipnat_y.y 25 Aug 2012 14:11:19 -0000 1.34 *************** *** 1163,1177 **** hostname: YY_STR { i6addr_t addr; bzero(&$$, sizeof($$)); ! if (gethost(AF_INET, $1, ! &addr) == 0) { ! $$.a = addr; ! $$.f = AF_INET; ! } else ! if (gethost(AF_INET6, $1, &addr) == 0) { $$.a = addr; - $$.f = AF_INET6; } else { FPRINTF(stderr, --- 1163,1179 ---- hostname: YY_STR { i6addr_t addr; + int family; + #ifdef USE_INET6 + if (nat->in_v[0] == 6) + family = AF_INET6; + else + #endif + family = AF_INET; bzero(&$$, sizeof($$)); ! $$.f = family; ! if (gethost(family, $1, &addr) == 0) { $$.a = addr; } else { FPRINTF(stderr, |