Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000388 [Yate - Yet Another Telephony Engine] engine minor always 2015-02-13 23:40 2015-03-06 22:43
Reporter mnhauke View Status public  
Assigned To
Priority normal Resolution open  
Status acknowledged   Product Version SVN
Summary 0000388: Error when starting up SGSN/GGSN
Description --------------------------------------------------------------------------------------------------------------
...
Starting transceiver
<transceiver:NOTE> bladeRFDevice.cpp:239:start: starting bladeRF in super speed mode...
<transceiver:NOTE> bladeRFDevice.cpp:482:readSamples: RX Timestamp adjusted by 1 to 2
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T1
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T2
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T3
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T4
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T5
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T6
<mbts:NOTE> GSMConfig.cpp:532:createCombinationI: Configuring combination I on C0T7
hostname: invalid option -- 'I'
Usage: hostname [-v] {hostname|-F file} set hostname (from file)
       domainname [-v] {nisdomain|-F file} set NIS domainname (from file)
       hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name
       hostname [-v] display hostname

       hostname -V|--version|-h|--help print info and exit

    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y

    -s, --short short host name
    -a, --alias alias names
    -i, --ip-address addresses for the hostname
    -f, --fqdn, --long long host name (FQDN)
    -d, --domain DNS domain name
    -y, --yp, --nis NIS/YP domainname
    -F, --file read hostname or NIS domainname from given file

   This command can read or set the hostname or the NIS domainname. You can
   also read the DNS domain or the FQDN (fully qualified domain name).
   Unless you are using bind or NIS for host lookups you can change the
   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
   part of the FQDN) in the /etc/hosts file.
RTNETLINK answers: File exists
MBTS ready
<ybts-signalling:INFO> Received [0x1079420]
-----
Primitive: RadioReady
Info: 0
-----
<ybts:NOTE> State changed Running -> RadioUp
...
--------------------------------------------------------------------------------------------------------------

Reason: (open)SUSE uses GNU /bin/hostname (from GNU inetutils:
http://www.gnu.org/software/inetutils/manual/inetutils.html#hostname-invocation) [^]
which has fewer options than debian/ubunto hostname (no -I option)

Attached a patch to workaround the issue on systems with /bin/hostname from inetutils
Additional Information
Tags No tags attached.
Attached Files ? file icon yatebts-sgsnggsn-inetutils-hostname-fix.diff [^] (486 bytes) 2015-02-13 23:40

- Relationships

-  Notes
(0000589)
paulc (administrator)
2015-02-26 11:46

It appears that the -I option is only supported in Debian based distros.

The -i option is not equivalent and depending on system configuration would return 127.0.0.1 which is undesirable.
(0000597)
mnhauke (reporter)
2015-03-06 22:43

OK, but why forking and parsing the output from /bin/hostname at all?
How do you think about getting the IP address directly in C via getifaddrs or rtnetlink ?

http://man7.org/linux/man-pages/man3/getifaddrs.3.html [^]
http://man7.org/linux/man-pages/man7/rtnetlink.7.html [^]

Examples could be found there:
http://www.binarytides.com/get-local-ip-c-linux/ [^]
http://cs.williams.edu/~morgan/code/C++/getip.cpp [^]

- Issue History
Date Modified Username Field Change
2015-02-13 23:40 mnhauke New Issue
2015-02-13 23:40 mnhauke File Added: yatebts-sgsnggsn-inetutils-hostname-fix.diff
2015-02-26 11:46 paulc Note Added: 0000589
2015-02-26 11:46 paulc Status new => acknowledged
2015-03-06 22:43 mnhauke Note Added: 0000597
2015-03-06 22:43 mnhauke Issue Monitored: mnhauke


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker