Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2009 09:27:07 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/netinet ip_ipsec.c ip_output.c tcp_subr.c src/sys/netinet6 ip6_forward.c ip6_ipsec.c ip6_output.c src/sys/netipsec ipsec.c ipsec.h ipsec6.h
Message-ID:  <200902080928.n189ST65033379@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

bz          2009-02-08 09:27:07 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          ip_ipsec.c ip_output.c tcp_subr.c 
    sys/netinet6         ip6_forward.c ip6_ipsec.c ip6_output.c 
    sys/netipsec         ipsec.c ipsec.h ipsec6.h 
  Log:
  SVN rev 188306 on 2009-02-08 09:27:07Z by bz
  
  Try to remove/assimilate as much of formerly IPv4/6 specific
  (duplicate) code in sys/netipsec/ipsec.c and fold it into
  common, INET/6 independent functions.
  
  The file local functions ipsec4_setspidx_inpcb() and
  ipsec6_setspidx_inpcb() were 1:1 identical after the change
  in r186528. Rename to ipsec_setspidx_inpcb() and remove the
  duplicate.
  
  Public functions ipsec[46]_get_policy() were 1:1 identical.
  Remove one copy and merge in the factored out code from
  ipsec_get_policy() into the other. The public function left
  is now called ipsec_get_policy() and callers were adapted.
  
  Public functions ipsec[46]_set_policy() were 1:1 identical.
  Rename file local ipsec_set_policy() function to
  ipsec_set_policy_internal().
  Remove one copy of the public functions, rename the other
  to ipsec_set_policy() and adapt callers.
  
  Public functions ipsec[46]_hdrsiz() were logically identical
  (ignoring one questionable assert in the v6 version).
  Rename the file local ipsec_hdrsiz() to ipsec_hdrsiz_internal(),
  the public function to ipsec_hdrsiz(), remove the duplicate
  copy and adapt the callers.
  The v6 version had been unused anyway. Cleanup comments.
  
  Public functions ipsec[46]_in_reject() were logically identical
  apart from statistics. Move the common code into a file local
  ipsec46_in_reject() leaving vimage+statistics in small AF specific
  wrapper functions. Note: unfortunately we already have a public
  ipsec_in_reject().
  
  Reviewed by:    sam
  Discussed with: rwatson (renaming to *_internal)
  MFC after:      26 days
  X-MFC:          keep wrapper functions for public symbols?
  
  Revision  Changes    Path
  1.15      +1 -3      src/sys/netinet/ip_ipsec.c
  1.298     +2 -2      src/sys/netinet/ip_output.c
  1.333     +2 -2      src/sys/netinet/tcp_subr.c
  1.49      +1 -1      src/sys/netinet6/ip6_forward.c
  1.15      +1 -3      src/sys/netinet6/ip6_ipsec.c
  1.128     +2 -2      src/sys/netinet6/ip6_output.c
  1.46      +56 -214   src/sys/netipsec/ipsec.c
  1.23      +3 -3      src/sys/netipsec/ipsec.h
  1.7       +0 -8      src/sys/netipsec/ipsec6.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902080928.n189ST65033379>