Code Review for ikev2

Prepared by:Dan McDonald (danmcd) on 2017-Aug-23 21:32 -0400 EDT
Workspace:/export/home/danmcd/ws/ikev2 (at 92ebb9f85ba2)
Compare against: origin/master (/export/home/danmcd/ws/illumos-joyent at 6ce43f2a6fa2)
Summary of changes: 15696 lines changed: 15696 ins; 0 del; 0 mod; 1305 unchg
Patch of changes: ikev2.patch

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/Makefile

Remove uneeded ref to stdio
Start of porting work to git
58 lines changed: 58 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/Makefile.com

very very start of sa_init exchange
mostly improved config parsing
more enums
more stuff
more stuff wired up
wire up inbound processing to worker
pkt cleanup
more inbound and packet work
get rid of old files
start of main
worker stuff
ikev2 -- now with bunyan!
pkcs11 fixes
fromto and inbound worker
Cleanup
pkcs11 & payload stuff
Added inital bits for prf support
Added in timer system using libuutil
Remove uneeded ref to stdio
Start of porting work to git
96 lines changed: 96 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/THIRDPARTYLICENSE

Remove uneeded ref to stdio
Start of porting work to git
26 lines changed: 26 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/THIRDPARTYLICENSE.descrip

Remove uneeded ref to stdio
Start of porting work to git
1 line changed: 1 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/amd64/Makefile

Remove uneeded ref to stdio
Start of porting work to git
30 lines changed: 30 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/buf.c

cstyle fixes
more inbound and packet work
the great buf change
Cleanup
Misc cleanup
consolidated buf_t work
203 lines changed: 203 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/buf.h

cstyle fixes
the great buf change
Cleanup
pkcs11 & payload stuff
Misc cleanup
consolidated buf_t work
Finished prf implementation for now
132 lines changed: 132 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/config.c

NAT bits pt 1
more config bits
initial parsing done
more parsing
mostly improved config parsing
more enums
string conversion for enumerated types
parse fixing (mostly) + plumbing
fixed hairy tokenization issue with minus
tokens, tokens everywhere
very start of config parsing
wire up inbound processing to worker
204 lines changed: 204 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/config.h

more sa_init work
NAT bits pt 1
more config bits
initial parsing done
more parsing
mostly improved config parsing
parse fixing (mostly) + plumbing
tokens, tokens everywhere
very start of config parsing
wire up inbound processing to worker
158 lines changed: 158 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/config_parse.c

more config bits
initial parsing done
more parsing
mostly improved config parsing
1613 lines changed: 1613 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/defs.h

initial parsing done
more cleanup
cstyle fixes
more inbound and packet work
more error stuff
socket stuff
i18n start
more error tweaking
use err key value for bunyan logging
start of main
move MAX_PACKET_SIZE back
start of worker
ikev2 -- now with bunyan!
Make pthread use a bit less verbose
simplify prf a bit
Cleanup
pkcs11 & payload stuff
SA work
Remove uneeded ref to stdio
Start of porting work to git
230 lines changed: 230 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/dh.c

more cleanup
the great buf change
let libpkcs11 take care of synchronization for us
use pthread_key instead of __thread
Cleanup
Added Diffie-Hellman support
393 lines changed: 393 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/dh.h

more cleanup
cstyle fixes
Added Diffie-Hellman support
36 lines changed: 36 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/fromto.c

cstyle fixes
more inbound and packet work
the great buf change
more error stuff
more bunyan logging
fromto and inbound worker
275 lines changed: 275 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/fromto.h

more inbound and packet work
37 lines changed: 37 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ike.h

more cleanup
debug formats
Cleanup
pkcs11 & payload stuff
Remove uneeded ref to stdio
Start of porting work to git
117 lines changed: 117 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev1.h

pkt fixes
pkcs11 & payload stuff
130 lines changed: 130 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev1_pkt.c

pkt fixes
pkcs11 & payload stuff
78 lines changed: 78 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2.h

more sa init stuff
payload padding
string conversion for enumerated types
everyone gets enums
more stuff wired up
fixup inbound/dispatch logic a bit plus logging
pkt cleanup
cstyle fixes
more inbound and packet work
pkt fixes
Cleanup
Added Diffie-Hellman support
Remove uneeded ref to stdio
Start of porting work to git
513 lines changed: 513 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_common.c

more stuff
134 lines changed: 134 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_enum.c

more sa init stuff
NAT bits pt 1
initial parsing done
more enums
string conversion for enumerated types
394 lines changed: 394 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_enum.h

more sa init stuff
NAT bits pt 1
initial parsing done
more enums
string conversion for enumerated types
40 lines changed: 40 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_pkt.c

more sa_init work
more sa init stuff
payload padding
index notify paylaods
more decrypt bits
factor out common encrypt/decrypt auth checks
pkt encryption
start of packet encryption
more stuff
wire up inbound processing to worker
pkt cleanup
cstyle fixes
pkt fixes
pkt fixes
debug formats
Cleanup
pkcs11 & payload stuff
1407 lines changed: 1407 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_pkt.h

more sa_init work
more sa init stuff
pkt encryption
more stuff
wire up inbound processing to worker
pkt cleanup
cstyle fixes
more inbound and packet work
pkt fixes
Cleanup
pkcs11 & payload stuff
88 lines changed: 88 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_proto.c

more sa_init work
NAT bits pt 1
very very start of sa_init exchange
initial parsing done
string conversion for enumerated types
pkt encryption
more cleanup
more stuff wired up
fixup inbound/dispatch logic a bit plus logging
wire up inbound processing to worker
417 lines changed: 417 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_proto.h

more sa_init work
very very start of sa_init exchange
string conversion for enumerated types
47 lines changed: 47 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_sa.c

more sa_init work
NAT bits pt 1
very very start of sa_init exchange
more cleanup
cstyle fixes
start of worker
ikev2 -- now with bunyan!
Make pthread use a bit less verbose
simplify sa allocation
misc fixes
Cleanup
Misc cleanup
SA work
943 lines changed: 943 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_sa.h

more sa_init work
NAT bits pt 1
very very start of sa_init exchange
payload padding
start of packet encryption
wire up inbound processing to worker
more cleanup
cstyle fixes
more inbound and packet work
ikev2 -- now with bunyan!
simplify sa allocation
Cleanup
Misc cleanup
SA work
196 lines changed: 196 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/ikev2_sa_init.c

more sa_init work
more sa init stuff
NAT bits pt 1
very very start of sa_init exchange
522 lines changed: 522 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/inbound.c

string conversion for enumerated types
fixup inbound/dispatch logic a bit plus logging
wire up inbound processing to worker
more cleanup
more inbound and packet work
221 lines changed: 221 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/inbound.h

cstyle fixes
more inbound and packet work
fromto and inbound worker
32 lines changed: 32 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/main.c

very very start of sa_init exchange
initial parsing done
parse fixing (mostly) + plumbing
hook in pfkey
cstyle fixes
more inbound and packet work
more error stuff
socket stuff
i18n start
more bunyan logging
let libpkcs11 take care of synchronization for us
more error tweaking
fix event dispatch
start of main
364 lines changed: 364 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pfkey.c

hook in pfkey
non-extended register
more stuff
more cleanup
cstyle fixes
the great buf change
Hey, hey, ho, ho, Sun Cluster's gotta go
Cleanup
769 lines changed: 769 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pkcs11.c

NAT bits pt 1
pkt encryption
start of packet encryption
pkt cleanup
cstyle fixes
the great buf change
socket stuff
more bunyan logging
let libpkcs11 take care of synchronization for us
more error tweaking
use err key value for bunyan logging
pkcs11 debugging info
ikev2 -- now with bunyan!
Make pthread use a bit less verbose
simplify prf a bit
use pthread_key instead of __thread
pkcs11 fixes
debug formats
pkcs11 & payload stuff
603 lines changed: 603 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pkcs11.h

NAT bits pt 1
pkt encryption
start of packet encryption
let libpkcs11 take care of synchronization for us
use pthread_key instead of __thread
pkcs11 fixes
misc fixes
Cleanup
pkcs11 & payload stuff
83 lines changed: 83 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pkt.c

more sa_init work
more decrypt bits
pkt encryption
more stuff wired up
wire up inbound processing to worker
pkt cleanup
more cleanup
cstyle fixes
the great buf change
pkt fixes
pkg fixes
pkt_stack documentation and cleanup
Cleanup
pkcs11 & payload stuff
1020 lines changed: 1020 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pkt.h

more sa_init work
more decrypt bits
pkt encryption
more stuff wired up
wire up inbound processing to worker
pkt cleanup
more cleanup
cstyle fixes
the great buf change
pkt_stack documentation and cleanup
move MAX_PACKET_SIZE back
start of worker
fromto and inbound worker
Cleanup
pkcs11 & payload stuff
201 lines changed: 201 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/pkt_impl.h

more decrypt bits
pkt cleanup
more cleanup
the great buf change
pkt_stack documentation and cleanup
fromto and inbound worker
Cleanup
pkcs11 & payload stuff
62 lines changed: 62 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/preshared.c

very very start of sa_init exchange
Cleanup
2041 lines changed: 2041 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/preshared.h

very very start of sa_init exchange
Cleanup
212 lines changed: 212 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/prf.c

fix renaming
cstyle fixes
the great buf change
let libpkcs11 take care of synchronization for us
simplify prf a bit
use pthread_key instead of __thread
Cleanup
consolidated buf_t work
Finished prf implementation for now
361 lines changed: 361 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/prf.h

more cleanup
consolidated buf_t work
Finished prf implementation for now
59 lines changed: 59 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/random.c

more sa init stuff
the great buf change
ikev2 -- now with bunyan!
Cleanup
105 lines changed: 105 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/random.h

more sa init stuff
Cleanup
71 lines changed: 71 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/timer.c

cstyle fixes
more bunyan logging
start of worker
convert timer to pthread_key
ikev2 -- now with bunyan!
Cleanup
Misc cleanup
consolidated buf_t work
Added in timer system using libuutil
373 lines changed: 373 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/timer.h

cstyle fixes
more bunyan logging
worker stuff
Added in timer system using libuutil
67 lines changed: 67 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/worker.c

string conversion for enumerated types
do worker suspend/resume
more cleanup
more stuff wired up
cstyle fixes
tweak worker dispatch
more bunyan logging
let libpkcs11 take care of synchronization for us
worker stuff
start of worker
423 lines changed: 423 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/common/worker.h

more cleanup
cstyle fixes
tweak worker dispatch
worker stuff
start of worker
45 lines changed: 45 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/i386/Makefile

Remove uneeded ref to stdio
Start of porting work to git
29 lines changed: 29 ins; 0 del; 0 mod; 0 unchg

------ ------ ------ ------ ------ --- New Patch Raw usr/src/cmd/cmd-inet/usr.lib/in.ikev2/sparcv9/Makefile

Remove uneeded ref to stdio
Start of porting work to git
30 lines changed: 30 ins; 0 del; 0 mod; 0 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/lib/libipsecutil/common/ikedoor.h

Cleanup
1 line changed: 1 ins; 0 del; 0 mod; 830 unchg

Cdiffs Udiffs Wdiffs Sdiffs Frames Old New Patch Raw usr/src/lib/libipsecutil/common/ipsec_util.h

fromto and inbound worker
6 lines changed: 6 ins; 0 del; 0 mod; 475 unchg

This code review page was prepared using /opt/onbld/bin/webrev. Webrev is maintained by the illumos project. The latest version may be obtained here.