-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IPv6 support to fwknop #285
base: master
Are you sure you want to change the base?
Changes from 1 commit
07693a9
b8252db
460bd8c
a0dda67
b3494dc
aea56f5
f7b18d6
2f6ea52
72a50b9
2367bc2
ce9b5fb
3dc6116
1a813bb
a525734
37a8000
6bcaf4f
8ecd10b
89c7d6f
bd1c488
a2462c6
82a5eec
17549b9
d1c1373
baed23c
f61a308
b070e80
da1ab05
76d609b
587a4fb
11e9b29
d6ce22b
32cdd11
f35c1d7
7437039
a2902cb
c753215
d260f50
c8670aa
3e329a5
9878756
1fd5fe1
6405398
08e805d
15dfc94
bbb341c
3a8e01a
13dee2c
9923fc0
c5994a3
e3aeb46
e29d62e
956e1df
edeea23
a7a9ecb
7f9d09e
576eb11
81e2255
fa664db
dd0597f
ba4d095
282aa2d
68cacee
d28d1cb
f97214b
0bbbd13
2bdaeff
fd6def0
561ba96
159c62c
70df56f
c1d3656
73d7b79
460774c
f3895bb
46d4d77
3f3b304
a2edaec
91f3842
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,8 +87,8 @@ typedef struct fko_cli_options | |
int no_save_args; | ||
int use_hmac; | ||
char spa_server_str[MAX_SERVER_STR_LEN]; /* may be a hostname */ | ||
char allow_ip_str[MAX_IPV4_STR_LEN]; | ||
char spoof_ip_src_str[MAX_IPV4_STR_LEN]; | ||
char allow_ip_str[MAX_IPV46_STR_LEN]; | ||
char spoof_ip_src_str[MAX_IPV46_STR_LEN]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use INET6_ADDRSTRLEN |
||
char spoof_user[MAX_USERNAME_LEN]; | ||
int rand_port; | ||
char gpg_recipient_key[MAX_GPG_KEY_ID]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,12 @@ | |
#define MAX_IPV4_STR_LEN 16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. INET4_ADDRSTRLEN |
||
#define MIN_IPV4_STR_LEN 7 | ||
|
||
#define MAX_IPV46_STR_LEN 40 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. INET6_ADDRSTRLEN |
||
#define MIN_IPV46_STR_LEN 3 | ||
|
||
#define MAX_IPV6_STR_LEN 40 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. INET6_ADDRSTRLEN |
||
#define MIN_IPV6_STR_LEN 3 | ||
|
||
#define MAX_PROTO_STR_LEN 4 /* tcp, udp, icmp for now */ | ||
#define MAX_PORT_STR_LEN 5 | ||
#define MAX_PORT 65535 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use INET6_ADDRSTRLEN
While you are right that longtest IPv6 address takes 39 bytes, with IPv4 tunneling, the longest form can be 45 bytes: