Ticket #1907 (new enhancement)
Setup - Use of uninitialized value $main::ua{"eth"}
| Reported by: | nuxwin | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | ispCP ω 1.1.0 |
| Component: | Setup | Version: | ispCP ω 1.0.3 |
| Severity: | Medium | Keywords: | setup |
| Cc: |
Description (last modified by nuxwin) (diff)
In the ispcp-setup file, a variable $main::ua{'eth'} is used by the check_host_interface routine. This variable is used as an argument in the system command ifconfig to display information of the interface i.e eth0 :
$cmd = "$main::cfg{'CMD_IFCONFIG'} $main::ua{'eth'} 1>/tmp/ispcp-setup-iface.stdout 2>/tmp/ispcp-setup-iface.stderr";
However, this variable is initialized anywhere. When the command is executed, here's the output that can be obtained:
- From perl
Use of uninitialized value $ua{"eth"} in concatenation (.) or string at teste.pl line 44. - From the system command ( redirected in the ispcp-setup-iface.stdout file ) :
breth0 Link encap:Ethernet HWaddr 00:16:17:9b:85:87 inet adr:192.168.0.110 Bcast:192.168.0.255 Masque:255.255.255.0 adr inet6: fe80::216:17ff:fe9b:8587/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:105112 errors:0 dropped:0 overruns:0 frame:0 TX packets:99254 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:85013520 (81.0 MiB) TX bytes:33403076 (31.8 MiB) eth0 Link encap:Ethernet HWaddr 00:16:17:9b:85:87 adr inet6: fe80::216:17ff:fe9b:8587/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:74837 errors:0 dropped:0 overruns:0 frame:0 TX packets:47918 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:99731804 (95.1 MiB) TX bytes:5680596 (5.4 MiB) Interruption:23 Adresse de base:0xf200 lo Link encap:Boucle locale inet adr:127.0.0.1 Masque:255.0.0.0 adr inet6: ::1/128 Scope:Hôte UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:38310 errors:0 dropped:0 overruns:0 frame:0 TX packets:38310 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:0 RX bytes:3701776 (3.5 MiB) TX bytes:3701776 (3.5 MiB) vbox0 Link encap:Ethernet HWaddr 00:ff:c1:46:ac:f8 adr inet6: fe80::2ff:c1ff:fe46:acf8/64 Scope:Lien UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:256528 overruns:0 carrier:0 collisions:0 lg file transmission:500 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
We can see here, a warning from perl is returned. If this does not interfere with the smooth running of the setup, this does not mean we should leave it as is ... This coding is not clean.
I think that a new variable named HOST_INTERFACE must be added in /etc/ispcp/ispcp.conf to allow the administrator to choose the interface name to use ( i.e eth0 ). and use it to initialize the variable $main::{'eth'}.
This is important because in some cases ( on large servers, for example ), the interface name may be different. I think especially in case of internet bridge ( i.e breth0 ), as in my case ( see the command output above ).
Please, confirm it for integrate in head !
Change History
comment:2 Changed 3 years ago by nuxwin
- Summary changed from Setup - Use of uninitialized value $ua{"eth"} to Setup - Use of uninitialized value $main::ua{"eth"}
comment:6 Changed 3 years ago by nuxwin
Oh my god! ! !
I did not see that you totally inhibited the call to the check_host_interface ... It is a very strange ways to fix bugs ... However, my point remains valid (the possibility to specify the interface), so I will see what we can do.
comment:8 Changed 3 years ago by nuxwin
- Priority changed from major to minor
- Type changed from defect to enhancement
- Component changed from Backend (Engine) to Setup
- Milestone changed from ispCP ω 1.0.1 to ispCP ω 1.0.2
comment:9 Changed 2 years ago by benedikt
- Milestone changed from ispCP ω 1.2.0 to ispCP ω 1.0.3
nuxwin, may you change this in setup? if not please move the ticket to 1.1.0
comment:11 Changed 2 years ago by nuxwin
- Version changed from ispCP ω 1.0.0 to ispCP ω 1.0.3
- Milestone changed from ispCP ω 1.1.0 to ispCP ω 1.0.4
comment:14 Changed 23 months ago by nuxwin
- Status changed from assigned to closed
- Resolution set to duplicate
comment:15 Changed 23 months ago by nuxwin
See #2293
comment:16 Changed 15 months ago by benedikt
- Status changed from closed to reopened
- Resolution duplicate deleted
- Milestone changed from ispCP ω 1.0.7 to ispCP ω 1.0.8
comment:17 Changed 15 months ago by benedikt
- Owner nuxwin deleted
- Status changed from reopened to new


