diff options
author | jjako <jjako> | 2004-01-14 06:22:08 +0000 |
---|---|---|
committer | jjako <jjako> | 2004-01-14 06:22:08 +0000 |
commit | 76032b9028432870faeb9df874062f73e5012692 (patch) | |
tree | 08f4ab4b5db70514fd44ef05fce49b8be8253686 /ggsn | |
parent | dea041164d5917ebc15842c20421c3db3bb52d1c (diff) |
Changet inet_aton to inet_pton for Solaris compliance
Diffstat (limited to 'ggsn')
-rw-r--r-- | ggsn/ggsn.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 75a76a4..a9d7e4f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -329,12 +329,21 @@ int main(int argc, char **argv) /* DNS1 and DNS2 */ dns1.s_addr = 0; - if (args_info.pcodns1_arg) - inet_aton(args_info.pcodns1_arg, &dns1); - + if (args_info.pcodns1_arg) { + if (0 >= inet_pton(AF_INET, args_info.pcodns1_arg, &dns1)) { + sys_err(LOG_ERR, __FILE__, __LINE__, 0, + "Failed to convert pcodns1!"); + exit(1); + } + } dns2.s_addr = 0; - if (args_info.pcodns2_arg) - inet_aton(args_info.pcodns2_arg, &dns2); + if (args_info.pcodns2_arg) { + if (0 >= inet_pton(AF_INET, args_info.pcodns2_arg, &dns2)) { + sys_err(LOG_ERR, __FILE__, __LINE__, 0, + "Failed to convert pcodns2!"); + exit(1); + } + } pco.l = 20; pco.v[0] = 0x80; /* x0000yyy x=1, yyy=000: PPP */ |