Giter VIP home page Giter VIP logo

chantra / openggsn Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 12.0 983 KB

OpenGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile operators as the interface between the Internet and the rest of the mobile network infrastructure. The project also developed an SGSN emulator suitable GPRS core network testing.

Home Page: http://sourceforge.net/projects/ggsn/

License: GNU General Public License v2.0

Perl 4.03% C 95.97%

openggsn's People

Contributors

chantra avatar laf0rge avatar ybonnamy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openggsn's Issues

ggsn unable to set tun interface on FreeBSD v11

Trying to start-up ggsn on a FreeBSD v11 box with

listen: 1.1.1.1
net 192.168.1.0/24
dynip: 192.168.1.0/24

results in errno 22 from tun.c

root@soak01:~ # ggsn -c /usr/local/etc/ggsn.conf -f -d                                                                                         
listen: (null)
conf: /usr/local/etc/ggsn.conf
fg: 1
debug: 1
qos: 0x0b921f
apn: internet
net: 192.168.0.0/24
pidfile: /var/run/ggsn.pid
statedir: /var/lib/ggsn/
timelimit: 0
cmdline_parser_configfile
listen: 1.1.1.1
conf: /usr/local/etc/ggsn.conf
fg: 1
debug: 1
qos: 0x0b921f
apn: internet
net: 192.168.1.0/24
dynip: 192.168.1.0/24
pidfile: /var/run/ggsn.pid
statedir: /var/lib/ggsn/
timelimit: 0
<000c> gtp.c:700 GTP: gtp_newgsn() started
<0001> tun.c:443 errno=22/Invalid argument ioctl(SIOCSIFADDR) failed
<0002> ggsn.c:518 Failed to set tun IP address

ggsn is able to create the tun0 interface

root@soak01:/usr/local/etc # ifconfig
vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:50:56:b1:95:31
        inet 10.5.8.201 netmask 0xffffff00 broadcast 10.5.8.255 
        inet6 fe80::250:56ff:feb1:9531%vmx0 prefixlen 64 scopeid 0x1 
        inet6 2001:1890:12f2:20::a05:8c9 prefixlen 64 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
vmx1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TSO6,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:50:56:b1:55:8c
        inet 1.1.1.1 netmask 0xffffff00 broadcast 1.1.1.255 
        inet6 fe80::250:56ff:feb1:558c%vmx1 prefixlen 64 scopeid 0x2 
        inet6 fdf6:4cfb:1::1 prefixlen 64 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo 
tun0: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: tun 

This looks to be the code section where it is failing:

 if (addr) { /* Set the interface address */
    this->addr.s_addr = addr->s_addr;
    memcpy(&((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr, addr,
      sizeof(*addr));
    if (ioctl(fd, SIOCSIFADDR, (void *) &ifr) < 0) {
      if (errno != EEXIST) {
	sys_err(LOG_ERR, __FILE__, __LINE__, errno,
		"ioctl(SIOCSIFADDR) failed");
      }
      else {
	sys_err(LOG_WARNING, __FILE__, __LINE__, errno,
		"ioctl(SIOCSIFADDR): Address already exists");
      }
      close(fd);
      return -1;
    }
  }

The server is running

FreeBSD soak01.eng.paloaltonetworks.local 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64

and

openggsn-0.92  

was install using the pkg command

gtpdump like standalone application

It's possible to release the gtpdump application like a standalone app. I mean, i really don't want the whole ggsn project, I just need to be able to dump gtp package in my current deployment.

GTPv1 to GTPv0 Interworking on Inter-SGSN RA Update

Hi,

I know that GTPv1 to GTPv0 interworking is not supported in 29.060. However, I was wondering what should happen when an MS creates a PDP Context through a GTPv1-capable SGSN and then moves to a GTPv0-capable one? If the SGSN Context Request procedure between the SGNSs succeeds(can this happen?), then how is the GGSN supposed to act on an Update PDP Context? This case also affects Secondary PDP contexts.

Generally, I am not sure how GSNs are supposed to act, because the GTPv1 PDP Contexts support more features than GTPv0 and the fallback scenarios are not documented, they seem to be rather best-practice.

The openggsn code handles both versions (from the GGSN side) without checking the current PDP Context version. Any information on how you think this should be handled?

maybe wrong GTPIE_RAB_CONTEXT fixed length?

I was looking inside gtp/gtpie.c and I found at line 280
that the length of a rab context ie is 7, but inside
the 29.060 specs it looks like that it should be 9,
so there should be "p += 1 + 9;" am I missing something?

case GTPIE_RAB_CONTEXT: /* TV GTPIE types with value length 7 /
if (j<GTPIE_SIZE) {
ie[j] = (union gtpie_member
) p;
if (GTPIE_DEBUG) printf("GTPIE TV 7 found. Type %d\n", ie[j]->tv0.t);
p+= 1 + 7;
j++;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.