Thank you for your reply and patch.

When I found out the mentioned compilation issue, a compiler stopped during 
compilation process with this message:

...
SERS=32 -D_KERNEL -D__landisk__ -MD -MP  -c ../../../../netinet/udp_usrreq.c
../../../../netinet/udp_usrreq.c: In function 'udp_input':
../../../../netinet/udp_usrreq.c:721: error: 'ipsecflowinfo' undeclared (first 
use in this function)
../../../../netinet/udp_usrreq.c:721: error: (Each undeclared identifier is 
reported only once
../../../../netinet/udp_usrreq.c:721: error: for each function it appears in.)
*** Error 1 in target 'udp_usrreq.o'
*** Error 1 in /usr/src/sys/arch/landisk/compile/dms.5.5.conf (Makefile:431 
'udp_usrreq.o')
#

I tried to make changes by myself, but unsuccessfully.

I applied the patch and tried to compile kernel without IPSEC, but still 
unsuccessfully. The compiler claims:

...
SERS=32 -D_KERNEL -D__landisk__ -MD -MP  -c ../../../../netinet/udp_usrreq.c
cc1: warnings being treated as errors
../../../../netinet/udp_usrreq.c: In function 'udp_input':
../../../../netinet/udp_usrreq.c:189: warning: unused variable 'error'
*** Error 1 in target 'udp_usrreq.o'
*** Error 1 in /usr/src/sys/arch/landisk/compile/dms.5.5.conf (Makefile:431 
'udp_usrreq.o')
#

I decided to put #endif /* IPSEC */ by one line below :

# diff -u -p udp_usrreq.c udp_usrreq.c.orig
--- udp_usrreq.c        Wed Jun 25 21:24:32 2014
+++ udp_usrreq.c.orig   Sat Jan 25 00:54:58 2014
@@ -186,8 +186,8 @@ udp_input(struct mbuf *m, ...)
        struct tdb_ident *tdbi;
        struct tdb *tdb;
        int error;
-#endif /* IPSEC */
        u_int32_t ipsecflowinfo = 0;
+#endif /* IPSEC */

        va_start(ap, m);
        iphlen = va_arg(ap, int);
#

However, kernel compilation still stopped with another message:

cc  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wno-main -Wno-uninitialized 
-Wno-format  -Wstack-larger-than-2047 -m4-nofpu -fno-builtin-printf -fno-builtin-snprintf  
-fno-builtin-vsnprintf -fno-builtin-log  -fno-builtin-log2 -fno-builtin-malloc -fno-pie -O2 -pipe 
-nostdinc -I../../../.. -I. -I../../../../arch -DDDB -DDIAGNOSTIC -DSYSVMSG -DSYSVSEM -DSYSVSHM 
-DFFS -DFFS2 -DFFS_SOFTUPDATES -DUFS_DIRHASH -DMFS -DNFSCLIENT -DNFSSERVER -DMSDOSFS -DFIFO -DTMPFS 
-DSOCKET_SPLICE -DTCP_SACK -DTCP_ECN -DTCP_SIGNATURE -DINET -DALTQ -DINET6 -DPIPEX -DMROUTING 
-DBOOT_CONFIG -DSH4 -DSH7751R -DPCLOCK="0x1fca055" -DDONT_INIT_BSC -DPCIVERBOSE 
-DUSER_PCICONF -DUSBVERBOSE -DSCIFCONSOLE -DSCIFCN_SPEED="0x2580" -DMAXUSERS=32 -D_KERNEL 
-D__landisk__ -MD -MP  -c vers.c
ld -N -Ttext 0x8c002000 -e start --warn-common -nopie -S -x -o dms 
${SYSTEM_HEAD} vers.o ${OBJS}
pipex.o(.text+0x99c): In function `GetNewKeyFromSHA':
: undefined reference to `SHA1Init'
pipex.o(.text+0x9a0): In function `GetNewKeyFromSHA':
: undefined reference to `SHA1Update'
pipex.o(.text+0x9ac): In function `GetNewKeyFromSHA':
: undefined reference to `SHA1Final'
*** Error 1 in /usr/src/sys/arch/landisk/compile/dms.5.5.conf (Makefile:340 
'dms': @echo ld -N -Ttext 0x8c002000 -e start --warn-common -nop...)
#

However, there is the similar hitch with MROUTING option. In case of IPSEC I tried to 
make my own changes in udp_usrreq.c before submitting the letter to "misc", but 
I can't do anything with MROUTING.
When I compile with IPSEC and without MROUTING copilation stops with message:

...
S=32 -D_KERNEL -D__landisk__ -MD -MP  -c ../../../../net/pfkeyv2_parsemessage.c
cc1: warnings being treated as errors
In file included from ../../../../net/pfkeyv2_parsemessage.c:79:
../../../../netinet/ip_var.h:178: warning: 'struct socket' declared inside 
parameter list
../../../../netinet/ip_var.h:178: warning: its scope is only this definition or 
declaration, which is probably not what you want
../../../../netinet/ip_var.h:211: warning: 'struct socket' declared inside 
parameter list
../../../../netinet/ip_var.h:216: warning: 'struct socket' declared inside 
parameter list
*** Error 1 in target 'pfkeyv2_parsemessage.o'
*** Error 1 in /usr/src/sys/arch/landisk/compile/dms.5.5.conf (Makefile:446 
'pfkeyv2_parsemessage.o')
#

As I can conclude, multicast routing have dependencies with IPSEC ...

Best wishes,
Ivan

On Mon, 23 Jun 2014 08:37:18 +0600, YASUOKA Masahiko <[email protected]> 
wrote:

On Sun, 22 Jun 2014 15:06:59 +0600
"Ivan Solonin" <[email protected]> wrote:
I tried to compile custom kernel in the 5.5 release of OpenBSD on
landisk platform with PIPEX, but found requirment of IPSEC by PIPEX.
As I've found in file /sys/netinet/udp_usrreq.c it uses IPSEC only
with L2TP to distinguish IPsec packets against non-IPsec.
Is PIPEX so strong require IPSEC?

No, it isn't.

Is it possible to compile custom kernel with PIPEX enabled, but
without IPSEC?

Below diff will fix compile without IPSEC.  Also I sent the diff to
tech@ to ask for fixing it in the cvs tree.

Index: sys/netinet/udp_usrreq.c
===================================================================
RCS file: /disk/cvs/openbsd/src/sys/netinet/udp_usrreq.c,v
retrieving revision 1.184
diff -u -p -r1.184 udp_usrreq.c
--- sys/netinet/udp_usrreq.c    23 Apr 2014 12:25:35 -0000      1.184
+++ sys/netinet/udp_usrreq.c    23 Jun 2014 02:17:06 -0000
@@ -186,9 +186,9 @@ udp_input(struct mbuf *m, ...)
        struct m_tag *mtag;
        struct tdb_ident *tdbi;
        struct tdb *tdb;
+#endif /* IPSEC */
        int error;
        u_int32_t ipsecflowinfo = 0;
-#endif /* IPSEC */
        va_start(ap, m);
        iphlen = va_arg(ap, int);

Reply via email to