mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-ggsn.git
synced 2025-11-02 13:13:25 +00:00
Compare commits
2 Commits
5a97e87eed
...
88d65840aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88d65840aa | ||
|
|
3aa81c594d |
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
File autogenerated by gengetopt version 2.22.6
|
||||
generated with the following command:
|
||||
gengetopt --conf-parser
|
||||
|
||||
The developers of gengetopt consider the fixed text that goes in all
|
||||
gengetopt output files to be in the public domain:
|
||||
we make no copyright claims on it.
|
||||
*/
|
||||
* File autogenerated by gengetopt version 2.22.6
|
||||
* generated with the following command:
|
||||
* gengetopt --conf-parser
|
||||
*
|
||||
* The developers of gengetopt consider the fixed text that goes in all
|
||||
* gengetopt output files to be in the public domain:
|
||||
* we make no copyright claims on it.
|
||||
*/
|
||||
|
||||
/* If we use autoconf. */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -80,7 +80,7 @@ const char *gengetopt_args_info_help[] = {
|
||||
" --pingcount=INT Number of ping req to send (default=`0')",
|
||||
" --pingquiet Do not print ping packet info (default=off)",
|
||||
" --no-tx-gpdu-seq Don't transmit G-PDU sequence nums\n (default=off)",
|
||||
" -t, --pdp-type=(v4|v6) PDP Type (default=`v4')",
|
||||
" -t, --pdp-type=(v4|v6|v4v6) PDP Type (default=`v4')",
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# OsmoGGSN - Gateway GPRS Support Node
|
||||
# Copyright (C) 2002, 2003, 2004 Mondru AB.
|
||||
#
|
||||
#
|
||||
# The contents of this file may be used under the terms of the GNU
|
||||
# General Public License Version 2, provided that the above copyright
|
||||
# notice and this permission notice is included in all copies or
|
||||
# substantial portions of the software.
|
||||
#
|
||||
#
|
||||
# Use
|
||||
# gengetopt --conf-parser < cmdline.ggo
|
||||
# linux-2.6/scripts/Lindent cmdline.c
|
||||
@@ -68,4 +68,4 @@ modeoption "pingcount" - "Number of ping req to send" int default="0" d
|
||||
modeoption "pingquiet" - "Do not print ping packet info" flag dependon="pinghost" off mode="pinghost"
|
||||
|
||||
option "no-tx-gpdu-seq" - "Don't transmit G-PDU sequence nums" flag off
|
||||
option "pdp-type" t "PDP Type" string default="v4" no typestr="(v4|v6)"
|
||||
option "pdp-type" t "PDP Type" string default="v4" no typestr="(v4|v6|v4v6)"
|
||||
|
||||
@@ -925,6 +925,8 @@ static int process_options(int argc, char **argv)
|
||||
options.pdp_type = PDP_EUA_TYPE_v6;
|
||||
else if (!strcmp(args_info.pdp_type_arg, "v4"))
|
||||
options.pdp_type = PDP_EUA_TYPE_v4;
|
||||
else if (!strcmp(args_info.pdp_type_arg, "v4v6"))
|
||||
options.pdp_type = PDP_EUA_TYPE_v4v6;
|
||||
else {
|
||||
SYS_ERR(DSGSN, LOGL_ERROR, 0, "Unsupported/unknown PDP Type '%s'\n",
|
||||
args_info.pdp_type_arg);
|
||||
@@ -944,6 +946,9 @@ static int process_options(int argc, char **argv)
|
||||
case PDP_EUA_TYPE_v6:
|
||||
hints.ai_family = AF_INET6;
|
||||
break;
|
||||
case PDP_EUA_TYPE_v4v6:
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
break;
|
||||
default:
|
||||
SYS_ERR(DSGSN, LOGL_ERROR, 0, "lookup(AF_UNSPEC) %d", options.pdp_type);
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
@@ -1664,7 +1669,8 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause)
|
||||
}
|
||||
}
|
||||
|
||||
if (options.createif && options.pdp_type == PDP_EUA_TYPE_v6) {
|
||||
if (options.createif && (options.pdp_type == PDP_EUA_TYPE_v6 ||
|
||||
options.pdp_type == PDP_EUA_TYPE_v4v6)) {
|
||||
struct in6_addr *saddr6;
|
||||
struct msgb *msg;
|
||||
if (in46a_is_v6(&addr[0])) {
|
||||
|
||||
Reference in New Issue
Block a user