/root/.gitconfig
/root/.bash_history
/var/ipfire/ethernet/aliases
+/var/ipfire/ethernet/wireless
return $user_agent;
}
+sub RedIsWireless() {
+ # This function checks if a network device is a wireless device.
+
+ my %settings = ();
+ &readhash("${General::swroot}/ethernet/settings", \%settings);
+
+ # Find the name of the network device.
+ my $device = $settings{'RED_DEV'};
+
+ # Exit, if no device is configured.
+ return 0 if ($device eq "");
+
+ # Return 1 if the device is a wireless one.
+ my $path = "/sys/class/net/$device/wireless";
+ if (-d $path) {
+ return 1;
+ }
+
+ # Otherwise return zero.
+ return 0;
+}
+
1;
if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
+
+ if (&General::RedIsWireless()) {
+ $menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1;
+ }
}
sub showhttpheaders
#
# Automatically generated file; DO NOT EDIT.
-# Linux/arm 3.2.47 Kernel Configuration
+# Linux/arm 3.2.48-ipfire-omap Kernel Configuration
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
# CONFIG_RT2X00 is not set
# CONFIG_RTL8192CU is not set
# CONFIG_WL1251 is not set
-# CONFIG_WL12XX_MENU is not set
+CONFIG_WL12XX_MENU=m
+CONFIG_WL12XX=m
+CONFIG_WL12XX_SDIO=m
+# CONFIG_WL12XX_SDIO_TEST is not set
+CONFIG_WL12XX_PLATFORM_DATA=y
# CONFIG_ZD1211RW is not set
# CONFIG_MWIFIEX is not set
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
CONFIG_USB_STORAGE_ENE_UB6250=m
-CONFIG_USB_UAS=m
# CONFIG_USB_LIBUSUAL is not set
#
'title' => "$Lang::tr{'alt dialup'}",
'enabled' => 1,
};
+ $subsystem->{'21.wlan'} = {
+ 'caption' => $Lang::tr{'wlan client'},
+ 'uri' => '/cgi-bin/wirelessclient.cgi',
+ 'title' => "$Lang::tr{'wlan client'}",
+ 'enabled' => 0,
+ };
$subsystem->{'30.ssh'} = {
'caption' => $Lang::tr{'ssh access'},
'uri' => '/cgi-bin/remote.cgi',
srv/web/ipfire/cgi-bin/wakeonlan.cgi
srv/web/ipfire/cgi-bin/webaccess.cgi
srv/web/ipfire/cgi-bin/wireless.cgi
+srv/web/ipfire/cgi-bin/wirelessclient.cgi
srv/web/ipfire/cgi-bin/xtaccess.cgi
srv/web/ipfire/html
var/updatecache
etc/rc.d/init.d/networking/any
etc/rc.d/init.d/networking/blue
etc/rc.d/init.d/networking/dhcpcd.exe
+etc/rc.d/init.d/networking/functions.network
etc/rc.d/init.d/networking/green
etc/rc.d/init.d/networking/orange
etc/rc.d/init.d/networking/red
etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
etc/rc.d/init.d/networking/red.up/99-fireinfo
etc/rc.d/init.d/networking/red.up/99-pakfire-update
+etc/rc.d/init.d/networking/wpa_supplicant.exe
#etc/rc.d/init.d/nfs-server
etc/rc.d/init.d/ntp
#etc/rc.d/init.d/nut
#etc/rc.d/init.d/vsftpd
#etc/rc.d/init.d/watchdog
#etc/rc.d/init.d/winbind
+etc/rc.d/init.d/wlanclient
#etc/rc.d/init.d/xinetd
#etc/rc.d/rc0.d
#etc/rc.d/rc0.d/K01imspetor
etc/rc.d/rc0.d/K78snort
etc/rc.d/rc0.d/K79leds
etc/rc.d/rc0.d/K80network
+etc/rc.d/rc0.d/K82wlanclient
#etc/rc.d/rc0.d/K84bluetooth
#etc/rc.d/rc0.d/K85messagebus
etc/rc.d/rc0.d/K85tmpfs
#etc/rc.d/rc3.d/S16bluetooth
#etc/rc.d/rc3.d/S18cpufreq
etc/rc.d/rc3.d/S19smartenabler
+etc/rc.d/rc3.d/S19wlanclient
etc/rc.d/rc3.d/S20network
etc/rc.d/rc3.d/S21leds
etc/rc.d/rc3.d/S24cyrus-sasl
etc/rc.d/rc6.d/K78snort
etc/rc.d/rc6.d/K79leds
etc/rc.d/rc6.d/K80network
+etc/rc.d/rc6.d/K82wlanclient
#etc/rc.d/rc6.d/K84bluetooth
#etc/rc.d/rc6.d/K85messagebus
etc/rc.d/rc6.d/K85tmpfs
#var/ipfire/ethernet/scanned_nics
#var/ipfire/ethernet/settings
#var/ipfire/ethernet/vlans
+#var/ipfire/ethernet/wireless
#var/ipfire/extrahd
#var/ipfire/extrahd/bin
var/ipfire/extrahd/bin/extrahd.pl
etc/rc.d/init.d/networking/any
etc/rc.d/init.d/networking/blue
etc/rc.d/init.d/networking/dhcpcd.exe
+etc/rc.d/init.d/networking/functions.network
etc/rc.d/init.d/networking/green
etc/rc.d/init.d/networking/orange
etc/rc.d/init.d/networking/red
etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
etc/rc.d/init.d/networking/red.up/99-fireinfo
etc/rc.d/init.d/networking/red.up/99-pakfire-update
+etc/rc.d/init.d/networking/wpa_supplicant.exe
#etc/rc.d/init.d/nfs-server
etc/rc.d/init.d/ntp
#etc/rc.d/init.d/nut
#etc/rc.d/init.d/vsftpd
#etc/rc.d/init.d/watchdog
#etc/rc.d/init.d/winbind
+etc/rc.d/init.d/wlanclient
#etc/rc.d/init.d/xinetd
#etc/rc.d/rc0.d
#etc/rc.d/rc0.d/K01imspetor
etc/rc.d/rc0.d/K78snort
etc/rc.d/rc0.d/K79leds
etc/rc.d/rc0.d/K80network
+etc/rc.d/rc0.d/K82wlanclient
#etc/rc.d/rc0.d/K84bluetooth
#etc/rc.d/rc0.d/K85messagebus
etc/rc.d/rc0.d/K85tmpfs
#etc/rc.d/rc3.d/S16bluetooth
#etc/rc.d/rc3.d/S18cpufreq
etc/rc.d/rc3.d/S19smartenabler
+etc/rc.d/rc3.d/S19wlanclient
etc/rc.d/rc3.d/S20network
etc/rc.d/rc3.d/S21leds
etc/rc.d/rc3.d/S24cyrus-sasl
etc/rc.d/rc6.d/K78snort
etc/rc.d/rc6.d/K79leds
etc/rc.d/rc6.d/K80network
+etc/rc.d/rc6.d/K82wlanclient
#etc/rc.d/rc6.d/K84bluetooth
#etc/rc.d/rc6.d/K85messagebus
etc/rc.d/rc6.d/K85tmpfs
#usr/bin/rsh
#usr/bin/talk
#usr/bin/tftp
-usr/bin/whois
#usr/sbin/ftpd
#usr/sbin/inetd
#usr/sbin/rexecd
--- /dev/null
+etc/jwhois.conf
+usr/bin/jwhois
+usr/bin/whois
+#usr/share/info/jwhois.info
+#usr/share/locale/es/LC_MESSAGES/jwhois.mo
+#usr/share/locale/fr/LC_MESSAGES/jwhois.mo
+#usr/share/locale/hu/LC_MESSAGES/jwhois.mo
+#usr/share/locale/id/LC_MESSAGES/jwhois.mo
+#usr/share/locale/it/LC_MESSAGES/jwhois.mo
+#usr/share/locale/nl/LC_MESSAGES/jwhois.mo
+#usr/share/locale/pl/LC_MESSAGES/jwhois.mo
+#usr/share/locale/pt_BR/LC_MESSAGES/jwhois.mo
+#usr/share/locale/ro
+#usr/share/locale/ro/LC_MESSAGES
+#usr/share/locale/ro/LC_MESSAGES/jwhois.mo
+#usr/share/locale/ru/LC_MESSAGES/jwhois.mo
+#usr/share/locale/rw/LC_MESSAGES/jwhois.mo
+#usr/share/locale/sv/LC_MESSAGES/jwhois.mo
+#usr/share/locale/tr/LC_MESSAGES/jwhois.mo
+#usr/share/locale/vi/LC_MESSAGES/jwhois.mo
+#usr/share/locale/zh_TW/LC_MESSAGES/jwhois.mo
+#usr/share/man/man1/jwhois.1
+#usr/share/man/sv
+#usr/share/man/sv/man1
+#usr/share/man/sv/man1/jwhois.1
usr/local/bin/updxlratorctrl
usr/local/bin/upnpctrl
usr/local/bin/urlfilterctrl
+usr/local/bin/wirelessclient
usr/local/bin/wirelessctrl
#usr/local/bin/wlanapctrl
--- /dev/null
+srv/web/ipfire/html/proxy.pac
+boot/config.txt
+etc/udev/rules.d/30-persistent-network.rules
+etc/collectd.custom
+etc/shadow
+etc/ipsec.conf
+etc/ipsec.secrets
+etc/ipsec.user.conf
+etc/ipsec.user.secrets
+var/log/cache
+var/updatecache
+etc/localtime
+var/ipfire/ovpn
+etc/ssh/ssh_config
+etc/ssh/sshd_config
+etc/ssl/openssl.cnf
+var/state/dhcp/dhcpd.leases
--- /dev/null
+../../../common/curl
\ No newline at end of file
--- /dev/null
+etc/system-release
+etc/issue
+var/ipfire/general-functions.pl
+var/ipfire/header.pl
+var/ipfire/menu.d/10-system.menu
+etc/rc.d/init.d/dnsmasq
+etc/rc.d/init.d/wlanclient
+etc/rc.d/init.d/networking/functions.network
+etc/rc.d/init.d/networking/wpa_supplicant.exe
+etc/rc.d/init.d/networking/red
+etc/rc.d/rc0.d/K82wlanclient
+etc/rc.d/rc3.d/S19wlanclient
+etc/rc.d/rc6.d/K82wlanclient
+usr/local/bin/wirelessclient
+srv/web/ipfire/cgi-bin/pppsetup.cgi
+srv/web/ipfire/cgi-bin/wirelessclient.cgi
+var/ipfire/langs
+var/ipfire/backup/include
--- /dev/null
+../../../common/jwhois
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+############################################################################
+# #
+# This file is part of the IPFire Firewall. #
+# #
+# IPFire is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# IPFire is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with IPFire; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Copyright (C) 2013 IPFire-Team <info@ipfire.org>. #
+# #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+/usr/local/bin/backupctrl exclude >/dev/null 2>&1
+
+#
+# Remove old core updates from pakfire cache to save space...
+core=71
+for (( i=1; i<=$core; i++ ))
+do
+ rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
+done
+
+#
+#Stop services
+
+#
+#Extract files
+extract_files
+
+#
+#Create wireless config file...
+touch /var/ipfire/ethernet/wireless
+chown nobody:nobody /var/ipfire/ethernet/wireless
+
+#
+#Start services
+
+#
+#Update Language cache
+perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
+
+sync
+
+# This update need a reboot...
+#touch /var/run/need_reboot
+
+#
+#Finish
+/etc/init.d/fireinfo start
+sendprofile
+#Don't report the exitcode last command
+exit 0
+
usr/share/mc/skins/featured.ini
usr/share/mc/skins/gotar.ini
usr/share/mc/skins/mc46.ini
+usr/share/mc/skins/modarcon16-defbg.ini
+usr/share/mc/skins/modarcon16.ini
+usr/share/mc/skins/modarcon16root-defbg.ini
+usr/share/mc/skins/modarcon16root.ini
+usr/share/mc/skins/modarin256-defbg.ini
+usr/share/mc/skins/modarin256.ini
+usr/share/mc/skins/modarin256root-defbg.ini
+usr/share/mc/skins/modarin256root.ini
usr/share/mc/skins/nicedark.ini
usr/share/mc/skins/sand256.ini
usr/share/mc/skins/xoria256.ini
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: translation string unused: use ibod
WARNING: translation string unused: view log
WARNING: translation string unused: vpn aggrmode
+<<<<<<< HEAD
WARNING: translation string unused: vpn incompatible use of defaultroute
+=======
+>>>>>>> 1b23ab3... Implement wireless client on RED.
WARNING: translation string unused: vpn mtu invalid
WARNING: translation string unused: vpn on blue
WARNING: translation string unused: vpn on green
WARNING: untranslated string: uptime load average
WARNING: untranslated string: visit us at
WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: wlan client
+WARNING: untranslated string: wlan client advanced settings
+WARNING: untranslated string: wlan client and
+WARNING: untranslated string: wlan client bssid
+WARNING: untranslated string: wlan client ccmp
+WARNING: untranslated string: wlan client configuration
+WARNING: untranslated string: wlan client disconnected
+WARNING: untranslated string: wlan client duplicate ssid
+WARNING: untranslated string: wlan client edit entry
+WARNING: untranslated string: wlan client encryption
+WARNING: untranslated string: wlan client encryption none
+WARNING: untranslated string: wlan client encryption wep
+WARNING: untranslated string: wlan client encryption wpa
+WARNING: untranslated string: wlan client encryption wpa2
+WARNING: untranslated string: wlan client group cipher
+WARNING: untranslated string: wlan client group key algorithm
+WARNING: untranslated string: wlan client invalid key length
+WARNING: untranslated string: wlan client new entry
+WARNING: untranslated string: wlan client new network
+WARNING: untranslated string: wlan client pairwise cipher
+WARNING: untranslated string: wlan client pairwise key algorithm
+WARNING: untranslated string: wlan client pairwise key group key
+WARNING: untranslated string: wlan client psk
+WARNING: untranslated string: wlan client ssid
+WARNING: untranslated string: wlan client tkip
+WARNING: untranslated string: wlan client wpa mode
+WARNING: untranslated string: wlan client wpa mode all
+WARNING: untranslated string: wlan client wpa mode ccmp ccmp
+WARNING: untranslated string: wlan client wpa mode ccmp tkip
+WARNING: untranslated string: wlan client wpa mode tkip tkip
WARNING: untranslated string: wlanap country
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: untranslated string: urlfilter mode block
WARNING: untranslated string: visit us at
WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: wlan client
+WARNING: untranslated string: wlan client advanced settings
+WARNING: untranslated string: wlan client and
+WARNING: untranslated string: wlan client bssid
+WARNING: untranslated string: wlan client ccmp
+WARNING: untranslated string: wlan client configuration
+WARNING: untranslated string: wlan client disconnected
+WARNING: untranslated string: wlan client duplicate ssid
+WARNING: untranslated string: wlan client edit entry
+WARNING: untranslated string: wlan client encryption
+WARNING: untranslated string: wlan client encryption none
+WARNING: untranslated string: wlan client encryption wep
+WARNING: untranslated string: wlan client encryption wpa
+WARNING: untranslated string: wlan client encryption wpa2
+WARNING: untranslated string: wlan client group cipher
+WARNING: untranslated string: wlan client group key algorithm
+WARNING: untranslated string: wlan client invalid key length
+WARNING: untranslated string: wlan client new entry
+WARNING: untranslated string: wlan client new network
+WARNING: untranslated string: wlan client pairwise cipher
+WARNING: untranslated string: wlan client pairwise key algorithm
+WARNING: untranslated string: wlan client pairwise key group key
+WARNING: untranslated string: wlan client psk
+WARNING: untranslated string: wlan client ssid
+WARNING: untranslated string: wlan client tkip
+WARNING: untranslated string: wlan client wpa mode
+WARNING: untranslated string: wlan client wpa mode all
+WARNING: untranslated string: wlan client wpa mode ccmp ccmp
+WARNING: untranslated string: wlan client wpa mode ccmp tkip
+WARNING: untranslated string: wlan client wpa mode tkip tkip
WARNING: untranslated string: wlanap access point
WARNING: untranslated string: wlanap channel
WARNING: untranslated string: wlanap country
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: translation string unused: use ibod
WARNING: translation string unused: view log
WARNING: translation string unused: vpn aggrmode
+<<<<<<< HEAD
WARNING: translation string unused: vpn incompatible use of defaultroute
+=======
+>>>>>>> 1b23ab3... Implement wireless client on RED.
WARNING: translation string unused: vpn mtu invalid
WARNING: translation string unused: vpn on blue
WARNING: translation string unused: vpn on green
WARNING: untranslated string: uptime load average
WARNING: untranslated string: visit us at
WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: wlan client
+WARNING: untranslated string: wlan client advanced settings
+WARNING: untranslated string: wlan client and
+WARNING: untranslated string: wlan client bssid
+WARNING: untranslated string: wlan client ccmp
+WARNING: untranslated string: wlan client configuration
+WARNING: untranslated string: wlan client disconnected
+WARNING: untranslated string: wlan client duplicate ssid
+WARNING: untranslated string: wlan client edit entry
+WARNING: untranslated string: wlan client encryption
+WARNING: untranslated string: wlan client encryption none
+WARNING: untranslated string: wlan client encryption wep
+WARNING: untranslated string: wlan client encryption wpa
+WARNING: untranslated string: wlan client encryption wpa2
+WARNING: untranslated string: wlan client group cipher
+WARNING: untranslated string: wlan client group key algorithm
+WARNING: untranslated string: wlan client invalid key length
+WARNING: untranslated string: wlan client new entry
+WARNING: untranslated string: wlan client new network
+WARNING: untranslated string: wlan client pairwise cipher
+WARNING: untranslated string: wlan client pairwise key algorithm
+WARNING: untranslated string: wlan client pairwise key group key
+WARNING: untranslated string: wlan client psk
+WARNING: untranslated string: wlan client ssid
+WARNING: untranslated string: wlan client tkip
+WARNING: untranslated string: wlan client wpa mode
+WARNING: untranslated string: wlan client wpa mode all
+WARNING: untranslated string: wlan client wpa mode ccmp ccmp
+WARNING: untranslated string: wlan client wpa mode ccmp tkip
+WARNING: untranslated string: wlan client wpa mode tkip tkip
WARNING: untranslated string: wlanap country
WARNING: translation string unused: umount
WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
-WARNING: translation string unused: unknown
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: updates is old1
WARNING: translation string unused: use ibod
WARNING: translation string unused: view log
WARNING: translation string unused: vpn aggrmode
+<<<<<<< HEAD
WARNING: translation string unused: vpn incompatible use of defaultroute
+=======
+>>>>>>> 1b23ab3... Implement wireless client on RED.
WARNING: translation string unused: vpn mtu invalid
WARNING: translation string unused: vpn on blue
WARNING: translation string unused: vpn on green
WARNING: untranslated string: uptime load average
WARNING: untranslated string: visit us at
WARNING: untranslated string: vpn keyexchange
+WARNING: untranslated string: wlan client
+WARNING: untranslated string: wlan client advanced settings
+WARNING: untranslated string: wlan client and
+WARNING: untranslated string: wlan client bssid
+WARNING: untranslated string: wlan client ccmp
+WARNING: untranslated string: wlan client configuration
+WARNING: untranslated string: wlan client disconnected
+WARNING: untranslated string: wlan client duplicate ssid
+WARNING: untranslated string: wlan client edit entry
+WARNING: untranslated string: wlan client encryption
+WARNING: untranslated string: wlan client encryption none
+WARNING: untranslated string: wlan client encryption wep
+WARNING: untranslated string: wlan client encryption wpa
+WARNING: untranslated string: wlan client encryption wpa2
+WARNING: untranslated string: wlan client group cipher
+WARNING: untranslated string: wlan client group key algorithm
+WARNING: untranslated string: wlan client invalid key length
+WARNING: untranslated string: wlan client new entry
+WARNING: untranslated string: wlan client new network
+WARNING: untranslated string: wlan client pairwise cipher
+WARNING: untranslated string: wlan client pairwise key algorithm
+WARNING: untranslated string: wlan client pairwise key group key
+WARNING: untranslated string: wlan client psk
+WARNING: untranslated string: wlan client ssid
+WARNING: untranslated string: wlan client tkip
+WARNING: untranslated string: wlan client wpa mode
+WARNING: untranslated string: wlan client wpa mode all
+WARNING: untranslated string: wlan client wpa mode ccmp ccmp
+WARNING: untranslated string: wlan client wpa mode ccmp tkip
+WARNING: untranslated string: wlan client wpa mode tkip tkip
WARNING: untranslated string: wlanap country
< vpn keyexchange
< wlanap access point
< wlanap channel
+< wlanap country
< wlanap debugging
< wlanap del interface
< wlanap encryption
< wlanap wlan services
< wlanap wlan settings
< wlanap wlan status
+< wlan client
+< wlan client advanced settings
+< wlan client and
+< wlan client bssid
+< wlan client ccmp
+< wlan client configuration
+< wlan client disconnected
+< wlan client duplicate ssid
+< wlan client edit entry
+< wlan client encryption
+< wlan client encryption none
+< wlan client encryption wep
+< wlan client encryption wpa
+< wlan client encryption wpa2
+< wlan client group cipher
+< wlan client group key algorithm
+< wlan client invalid key length
+< wlan client new entry
+< wlan client new network
+< wlan client pairwise cipher
+< wlan client pairwise key algorithm
+< wlan client pairwise key group key
+< wlan client psk
+< wlan client ssid
+< wlan client tkip
+< wlan client wpa mode
+< wlan client wpa mode all
+< wlan client wpa mode ccmp ccmp
+< wlan client wpa mode ccmp tkip
+< wlan client wpa mode tkip tkip
############################################################################
# Checking install/setup translations for language: es #
############################################################################
< uptime load average
< visit us at
< vpn keyexchange
+< wlanap country
+< wlan client
+< wlan client advanced settings
+< wlan client and
+< wlan client bssid
+< wlan client ccmp
+< wlan client configuration
+< wlan client disconnected
+< wlan client duplicate ssid
+< wlan client edit entry
+< wlan client encryption
+< wlan client encryption none
+< wlan client encryption wep
+< wlan client encryption wpa
+< wlan client encryption wpa2
+< wlan client group cipher
+< wlan client group key algorithm
+< wlan client invalid key length
+< wlan client new entry
+< wlan client new network
+< wlan client pairwise cipher
+< wlan client pairwise key algorithm
+< wlan client pairwise key group key
+< wlan client psk
+< wlan client ssid
+< wlan client tkip
+< wlan client wpa mode
+< wlan client wpa mode all
+< wlan client wpa mode ccmp ccmp
+< wlan client wpa mode ccmp tkip
+< wlan client wpa mode tkip tkip
############################################################################
# Checking install/setup translations for language: pl #
############################################################################
< uptime load average
< visit us at
< vpn keyexchange
+< wlanap country
+< wlan client
+< wlan client advanced settings
+< wlan client and
+< wlan client bssid
+< wlan client ccmp
+< wlan client configuration
+< wlan client disconnected
+< wlan client duplicate ssid
+< wlan client edit entry
+< wlan client encryption
+< wlan client encryption none
+< wlan client encryption wep
+< wlan client encryption wpa
+< wlan client encryption wpa2
+< wlan client group cipher
+< wlan client group key algorithm
+< wlan client invalid key length
+< wlan client new entry
+< wlan client new network
+< wlan client pairwise cipher
+< wlan client pairwise key algorithm
+< wlan client pairwise key group key
+< wlan client psk
+< wlan client ssid
+< wlan client tkip
+< wlan client wpa mode
+< wlan client wpa mode all
+< wlan client wpa mode ccmp ccmp
+< wlan client wpa mode ccmp tkip
+< wlan client wpa mode tkip tkip
############################################################################
# Checking install/setup translations for language: ru #
############################################################################
< visit us at
< vpn keyexchange
< week-graph
+< wlanap country
+< wlan client
+< wlan client advanced settings
+< wlan client and
+< wlan client bssid
+< wlan client ccmp
+< wlan client configuration
+< wlan client disconnected
+< wlan client duplicate ssid
+< wlan client edit entry
+< wlan client encryption
+< wlan client encryption none
+< wlan client encryption wep
+< wlan client encryption wpa
+< wlan client encryption wpa2
+< wlan client group cipher
+< wlan client group key algorithm
+< wlan client invalid key length
+< wlan client new entry
+< wlan client new network
+< wlan client pairwise cipher
+< wlan client pairwise key algorithm
+< wlan client pairwise key group key
+< wlan client psk
+< wlan client ssid
+< wlan client tkip
+< wlan client wpa mode
+< wlan client wpa mode all
+< wlan client wpa mode ccmp ccmp
+< wlan client wpa mode ccmp tkip
+< wlan client wpa mode tkip tkip
< year-graph
</tr>
<tr>
<tr>
- <td width='25%'>MTU</td>
+ <td width='25%'>MTU <img src='/blob.gif' alt='*' /></td>
<td width='25%'><input type='text' name='MTU' value='$pppsettings{'MTU'}' /></td>
</tr>
<tr>
- <td width='25%'>MRU</td>
+ <td width='25%'>MRU <img src='/blob.gif' alt='*' /></td>
<td width='25%'><input type='text' name='MRU' value='$pppsettings{'MRU'}' /></td>
</tr>
END
$pppsettings{'PPTP_NICCFG'} = '10.0.0.140/24 broadcast 10.0.0.255';
$pppsettings{'PPTP_ROUTE'} = '';
$pppsettings{'PROTOCOL'} = 'RFC2364';
- $pppsettings{'MTU'} = '1492';
- $pppsettings{'MRU'} = '1492';
+ $pppsettings{'MTU'} = '';
+ $pppsettings{'MRU'} = '';
$pppsettings{'DIALMODE'} = 'T';
$pppsettings{'MAXRETRIES'} = 5;
$pppsettings{'HOLDOFF'} = 30;
--- /dev/null
+#!/usr/bin/perl
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2012 IPFire Team <info@ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+# DEVICE,ENABLED,MODE,WPA_MODE,SSID,PSK,PRIO
+# wlan0,on,WPA2,,Use This One Mum,ThisIsTheKey,2
+
+use strict;
+
+# enable only the following on debugging purpose
+use warnings;
+use CGI::Carp 'fatalsToBrowser';
+
+require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
+require "${General::swroot}/header.pl";
+
+#workaround to suppress a warning when a variable is used only once
+my @dummy = ( ${Header::colouryellow} );
+undef (@dummy);
+
+# Files used
+my $setting = "${General::swroot}/main/settings";
+our $datafile = "${General::swroot}/ethernet/wireless";
+
+my %color = ();
+my %mainsettings = ();
+&General::readhash("${General::swroot}/main/settings", \%mainsettings);
+&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+
+our %settings = ();
+our %netsettings = ();
+
+$settings{'ID'} = '';
+$settings{'INTERFACE'} = '';
+$settings{'ENABLED'} = '';
+$settings{'ENCRYPTION'} = '';
+$settings{'WPA_MODE'} = '';
+$settings{'SSID'} = '';
+$settings{'PSK'} = '';
+$settings{'PRIO'} = '';
+
+$settings{'ACTION'} = ''; # add/edit/remove
+$settings{'ID'} = ''; # point record for ACTION
+
+my $errormessage = '';
+my $warnmessage = '';
+
+&Header::showhttpheaders();
+
+#Get GUI values
+&Header::getcgihash(\%settings);
+
+# Load multiline data
+our @configs = ();
+if (open(FILE, "$datafile")) {
+ @configs = <FILE>;
+ close (FILE);
+}
+
+&General::readhash("${General::swroot}/main/settings", \%settings);
+&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
+
+# Toggle enable/disable field.
+if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
+ my @update;
+
+ foreach my $line (@configs) {
+ chomp($line);
+ my @config = split(/\,/, $line);
+
+ # Update the entry with the matching ID.
+ if ($config[0] eq $settings{'ID'}) {
+ # Toggle enabled/disabled status.
+
+ if ($config[2] eq 'on') {
+ $config[2] = 'off';
+ } else {
+ $config[2] = 'on';
+ }
+
+ $line = join(',', @config);
+ }
+
+ push(@update, $line."\n");
+ }
+
+ # Save updated configuration settings.
+ open(FILE, ">$datafile") or die 'wlan client datafile error';
+ print FILE @update;
+ close(FILE);
+
+ @configs = @update;
+
+ # Update configuration files.
+ &BuildConfiguration();
+
+ # Reset ACTION.
+ $settings{'ACTION'} = '';
+}
+
+if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
+ # Validate input data.
+ $errormessage = ValidateInput("add");
+
+ unless ($errormessage) {
+ # Search for the next free id.
+ my $next_id = NextID();
+
+ my @config = ($next_id);
+ push(@config, $settings{'INTERFACE'});
+ push(@config, $settings{'ENABLED'});
+ push(@config, $settings{'ENCRYPTION'});
+ push(@config, $settings{'WPA_MODE'});
+ push(@config, $settings{'SSID'});
+ push(@config, $settings{'PSK'});
+ push(@config, $settings{'PRIO'});
+
+ # Add the new configuration and write all the stuff to the configuration file.
+ my $line = join(',', @config) . "\n";
+ push(@configs, $line);
+
+ # Save updated configuration settings.
+ open(FILE, ">$datafile") or die 'wlan client datafile error';
+ print FILE @configs;
+ close(FILE);
+
+ # Update configuration files.
+ &BuildConfiguration();
+
+ # Reset ACTION.
+ $settings{'ACTION'} = '';
+ }
+}
+
+if ($settings{'ACTION'} eq $Lang::tr{'edit'}) {
+ foreach my $line (@configs) {
+ chomp($line);
+ my @config = split(/\,/, $line);
+
+ if ($config[0] eq $settings{'ID'}) {
+ $settings{'ID'} = $config[0];
+ $settings{'INTERFACE'} = $config[1];
+ $settings{'ENABLED'} = $config[2];
+ $settings{'ENCRYPTION'} = $config[3];
+ $settings{'WPA_MODE'} = $config[4];
+ $settings{'SSID'} = $config[5];
+ $settings{'PSK'} = $config[6];
+ $settings{'PRIO'} = $config[7];
+ }
+ }
+}
+
+if ($settings{'ACTION'} eq $Lang::tr{'update'}) {
+ $errormessage = ValidateInput("update");
+
+ unless ($errormessage) {
+ my @update;
+ foreach my $line (@configs) {
+ chomp($line);
+ my @config = split(/\,/, $line);
+
+ # Update the entry with the matching ID.
+ if ($config[0] eq $settings{'ID'}) {
+ # Update all configuration settings.
+ # ID and INTERFACE cannot be changed.
+ $config[2] = $settings{'ENABLED'};
+ $config[3] = $settings{'ENCRYPTION'};
+ $config[4] = $settings{'WPA_MODE'};
+ $config[5] = $settings{'SSID'};
+ $config[6] = $settings{'PSK'};
+ $config[7] = $settings{'PRIO'};
+
+ $line = join(',', @config);
+ }
+
+ push(@update, $line."\n");
+ }
+
+ # Save updated configuration settings.
+ open(FILE, ">$datafile") or die 'wlan client datafile error';
+ print FILE @update;
+ close(FILE);
+
+ @configs = @update;
+
+ # Update configuration files.
+ &BuildConfiguration();
+
+ # Reset ACTION.
+ $settings{'ACTION'} = '';
+ }
+}
+
+if ($settings{'ACTION'} eq $Lang::tr{'remove'}) {
+ my @update;
+
+ foreach my $line (@configs) {
+ chomp($line);
+ my @config = split(/\,/, $line);
+
+ # Skip the to be removed entry.
+ if ($config[0] eq $settings{'ID'}) {
+ next;
+ }
+
+ push(@update, $line."\n");
+ }
+
+ # Save updated configuration settings.
+ open(FILE, ">$datafile") or die 'wlan client datafile error';
+ print FILE @update;
+ close(FILE);
+
+ @configs = @update;
+
+ # Update configuration files.
+ &BuildConfiguration();
+
+ # Reset ACTION.
+ $settings{'ACTION'} = '';
+}
+
+if ($settings{'ACTION'} eq '') { # First launch from GUI
+ &showMainBox();
+} else {
+ # Action has been set, so show the edit box.
+ &showEditBox();
+}
+
+sub showMainBox() {
+ &Header::openpage($Lang::tr{'wlan client configuration'}, 1, '');
+ &Header::openbigbox('100%', 'left', '', $errormessage);
+
+ &Header::openbox('100%', 'left', $Lang::tr{'wlan client configuration'});
+
+ print <<END;
+ <form method='POST' action='$ENV{'SCRIPT_NAME'}' style='text-align: center;'>
+ <input type='submit' name='ACTION' value='$Lang::tr{'wlan client new network'}' />
+ </form>
+
+ <br><hr><br>
+
+ <table width="100%">
+ <tr>
+ <th align='center'>$Lang::tr{'wlan client ssid'}</th>
+ <th align='center'>$Lang::tr{'wlan client encryption'}</th>
+ <th align='center'>$Lang::tr{'priority'}</th>
+ </tr>
+END
+
+ #
+ # Print each line of @configs list
+ #
+
+ my $key = 0;
+ foreach my $line (@configs) {
+ # Skip commented lines.
+ my $firstchar = substr($line, 0, 1);
+ next if ($firstchar eq "#");
+
+ chomp($line);
+ my @config = split(/\,/,$line);
+
+ #Choose icon for checkbox
+ my $gif = '';
+ my $gdesc = '';
+ if ($config[2] eq 'on' ) {
+ $gif = 'on.gif';
+ $gdesc = $Lang::tr{'click to disable'};
+ } else {
+ $gif = 'off.gif';
+ $gdesc = $Lang::tr{'click to enable'};
+ }
+
+ # Colorize each line
+ if ($key % 2) {
+ print "<tr bgcolor='$color{'color22'}'>";
+ } else {
+ print "<tr bgcolor='$color{'color20'}'>";
+ }
+
+ my $encryption_mode = $Lang::tr{'unknown'};
+ if ($config[3] eq "NONE") {
+ $encryption_mode = $Lang::tr{'wlan client encryption none'};
+ } elsif ($config[3] eq "WEP") {
+ $encryption_mode = $Lang::tr{'wlan client encryption wep'};
+ } elsif ($config[3] eq "WPA") {
+ $encryption_mode = $Lang::tr{'wlan client encryption wpa'};
+ } elsif ($config[3] eq "WPA2") {
+ $encryption_mode = $Lang::tr{'wlan client encryption wpa2'};
+ }
+
+ if (($config[3] eq "WPA") || ($config[3] eq "WPA2")) {
+ my $wpa_pairwise = "$Lang::tr{'wlan client ccmp'} $Lang::tr{'wlan client and'} $Lang::tr{'wlan client tkip'}";
+ my $wpa_group = "$Lang::tr{'wlan client ccmp'} $Lang::tr{'wlan client and'} $Lang::tr{'wlan client tkip'}";
+
+ if ($config[4] eq "CCMP-CCMP") {
+ $wpa_pairwise = $Lang::tr{'wlan client ccmp'};
+ $wpa_group = $Lang::tr{'wlan client ccmp'};
+ } elsif ($config[4] eq "CCMP-TKIP") {
+ $wpa_pairwise = $Lang::tr{'wlan client ccmp'};
+ $wpa_group = $Lang::tr{'wlan client tkip'};
+ } elsif ($config[4] eq "TKIP-TKIP") {
+ $wpa_pairwise = $Lang::tr{'wlan client tkip'};
+ $wpa_group = $Lang::tr{'wlan client tkip'};
+ }
+
+ $encryption_mode .= "<hr>";
+ $encryption_mode .= "<strong>$Lang::tr{'wlan client pairwise key algorithm'}</strong>: ";
+ $encryption_mode .= $wpa_pairwise;
+ $encryption_mode .= "<br>";
+ $encryption_mode .= "<strong>$Lang::tr{'wlan client group key algorithm'}</strong>: ";
+ $encryption_mode .= $wpa_group;
+ }
+
+ print <<END;
+ <td align='center'>$config[5]</td>
+ <td align='center'>$encryption_mode</td>
+ <td align='center'>$config[7]</td>
+ <td align='center' width='5%'>
+ <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+ <input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' />
+ <input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gif' alt='$gdesc' title='$gdesc' />
+ <input type='hidden' name='ID' value='$config[0]' />
+ </form>
+ </td>
+ <td align='center' width='5%'>
+ <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+ <input type='hidden' name='ACTION' value='$Lang::tr{'edit'}' />
+ <input type='image' name='$Lang::tr{'edit'}' src='/images/edit.gif' alt='$Lang::tr{'edit'}' title='$Lang::tr{'edit'}' />
+ <input type='hidden' name='ID' value='$config[0]' />
+ </form>
+ </td>
+ <td align='center' width='5%'>
+ <form method='post' action='$ENV{'SCRIPT_NAME'}'>
+ <input type='hidden' name='ACTION' value='$Lang::tr{'remove'}' />
+ <input type='image' name='$Lang::tr{'remove'}' src='/images/delete.gif' alt='$Lang::tr{'remove'}' title='$Lang::tr{'remove'}' />
+ <input type='hidden' name='ID' value='$config[0]' />
+ </form>
+ </td>
+ </tr>
+END
+ $key++;
+ }
+ print "</table>";
+
+ # If table contains entries, print 'Key to action icons'
+ if ($key) {
+ print <<END;
+ <table>
+ <tr>
+ <td class='boldbase'> <b>$Lang::tr{'legend'}: </b></td>
+ <td><img src='/images/on.gif' alt='$Lang::tr{'click to disable'}' /></td>
+ <td class='base'>$Lang::tr{'click to disable'}</td>
+ <td> </td>
+ <td><img src='/images/off.gif' alt='$Lang::tr{'click to enable'}' /></td>
+ <td class='base'>$Lang::tr{'click to enable'}</td>
+ <td> </td>
+ <td><img src='/images/edit.gif' alt='$Lang::tr{'edit'}' /></td>
+ <td class='base'>$Lang::tr{'edit'}</td>
+ <td> </td>
+ <td><img src='/images/delete.gif' alt='$Lang::tr{'remove'}' /></td>
+ <td class='base'>$Lang::tr{'remove'}</td>
+ </tr>
+ </table>
+END
+ }
+
+ &Header::closebox();
+
+ # Show status box.
+ &ShowStatus();
+
+ &Header::closebigbox();
+ &Header::closepage();
+}
+
+sub showEditBox() {
+ &Header::openpage($Lang::tr{'wlan client configuration'}, 1, '');
+ &Header::openbigbox('100%', 'left', '', $errormessage);
+
+ if ($errormessage) {
+ &Header::openbox('100%', 'left', $Lang::tr{'error messages'});
+ print "<font class='base'>$errormessage </font>";
+ &Header::closebox();
+ }
+
+ my $buttontext = $Lang::tr{'add'};
+ if ($settings{'ID'} ne '') {
+ $buttontext = $Lang::tr{'update'};
+ &Header::openbox('100%', 'left', $Lang::tr{'wlan client edit entry'});
+ } else {
+ &Header::openbox('100%', 'left', $Lang::tr{'wlan client new entry'});
+ $settings{'ENABLED'} = 'on';
+ }
+ my $action = $buttontext;
+
+ my %checked = ();
+ $checked{'ENABLED'} = ($settings{'ENABLED'} ne 'on' ) ? '' : "checked='checked'";
+
+ my %selected = ();
+ $selected{'ENCRYPTION'} = ();
+ $selected{'ENCRYPTION'}{'NONE'} = '';
+ $selected{'ENCRYPTION'}{'WPA2'} = '';
+ $selected{'ENCRYPTION'}{'WPA'} = '';
+ $selected{'ENCRYPTION'}{'WEP'} = '';
+ $selected{'ENCRYPTION'}{$settings{'ENCRYPTION'}} = "selected='selected'";
+
+ $selected{'WPA_MODE'} = ();
+ $selected{'WPA_MODE'}{''} = '';
+ $selected{'WPA_MODE'}{'CCMP-CCMP'} = '';
+ $selected{'WPA_MODE'}{'CCMP-TKIP'} = '';
+ $selected{'WPA_MODE'}{'TKIP-TKIP'} = '';
+ $selected{'WPA_MODE'}{$settings{'WPA_MODE'}} = "selected='selected'";
+
+ $selected{'PRIO'} = ();
+ $selected{'PRIO'}{'0'} = '';
+ $selected{'PRIO'}{'1'} = '';
+ $selected{'PRIO'}{'2'} = '';
+ $selected{'PRIO'}{'3'} = '';
+ $selected{'PRIO'}{'4'} = '';
+ $selected{'PRIO'}{$settings{'PRIO'}} = "selected='selected'";
+
+ print <<END;
+ <form method='POST' action='$ENV{'SCRIPT_NAME'}'>
+ <input type='hidden' name='ID' value='$settings{'ID'}'>
+
+ <table width='100%'>
+ <tr>
+ <td class='base' width='20%'>$Lang::tr{'wlan client ssid'}:</td>
+ <td width='40%'><input type='text' name='SSID' value='$settings{'SSID'}' size='25'/></td>
+ <td class='base' width='10%'>$Lang::tr{'enabled'}</td>
+ <td width='30%'><input type='checkbox' name='ENABLED' $checked{'ENABLED'} /></td>
+ </tr>
+ <tr>
+ <td class='base' width='20%'>$Lang::tr{'wlan client encryption'}:</td>
+ <td width='40%'>
+ <select name='ENCRYPTION'>
+ <option value="NONE" $selected{'ENCRYPTION'}{'NONE'}>$Lang::tr{'wlan client encryption none'}</option>
+ <option value="WPA2" $selected{'ENCRYPTION'}{'WPA2'}>$Lang::tr{'wlan client encryption wpa2'}</option>
+ <option value="WPA" $selected{'ENCRYPTION'}{'WPA'}>$Lang::tr{'wlan client encryption wpa'}</option>
+ <option value="WEP" $selected{'ENCRYPTION'}{'WEP'}>$Lang::tr{'wlan client encryption wep'}</option>
+ </select>
+ </td>
+ <td colspan="2" width='40%'></td>
+ </tr>
+ <tr>
+ <td class='base' width='20%'>$Lang::tr{'wlan client psk'}: </td>
+ <td width='40%'><input type='password' name='PSK' value='$settings{'PSK'}' size='25'/></td>
+ <td colspan="2" width='40%'></td>
+ </tr>
+ </table>
+
+ <br>
+ <hr>
+
+ <strong>
+ $Lang::tr{'wlan client advanced settings'}:
+ </strong>
+
+ <table width='100%'>
+ <tr>
+ <td class='base' width='20%'>
+ $Lang::tr{'wlan client wpa mode'}:
+ </td>
+ <td width='40%'>
+ <select name='WPA_MODE'>
+ <option value="" $selected{'WPA_MODE'}{''}>$Lang::tr{'wlan client wpa mode all'}</option>
+ <option value="CCMP-CCMP" $selected{'WPA_MODE'}{'CCMP-CCMP'}>$Lang::tr{'wlan client wpa mode ccmp ccmp'}</option>
+ <option value="CCMP-TKIP" $selected{'WPA_MODE'}{'CCMP-TKIP'}>$Lang::tr{'wlan client wpa mode ccmp tkip'}</option>
+ <option value="TKIP-TKIP" $selected{'WPA_MODE'}{'TKIP-TKIP'}>$Lang::tr{'wlan client wpa mode tkip tkip'}</option>
+ </select>
+ </td>
+ <td colspan="2" width='40%'>
+ <em>($Lang::tr{'wlan client pairwise key group key'})</em>
+ </td>
+ </tr>
+ <tr>
+ <td class='base' width='20%'>
+ $Lang::tr{'priority'}:
+ </td>
+ <td width='40%'>
+ <select name='PRIO'>
+ <option value="0" $selected{'PRIO'}{'0'}>0</option>
+ <option value="1" $selected{'PRIO'}{'1'}>1</option>
+ <option value="2" $selected{'PRIO'}{'2'}>2</option>
+ <option value="3" $selected{'PRIO'}{'3'}>3</option>
+ <option value="4" $selected{'PRIO'}{'4'}>4</option>
+ </select>
+ </td>
+ <td colspan="2" width='40%'></td>
+ </tr>
+ </table>
+
+ <br>
+ <hr>
+
+ <table width='100%'>
+ <tr>
+ <td width='50%' align='center'>
+ <input type='hidden' name='ACTION' value='$action' />
+ <input type='submit' name='SUBMIT' value='$buttontext' />
+ </td>
+ </tr>
+ </table>
+ </form>
+END
+ &Header::closebox();
+
+ &Header::closebigbox();
+ &Header::closepage();
+}
+
+sub ShowStatus() {
+ my $device = $netsettings{'RED_DEV'};
+
+ # Exit if no device is configured.
+ return if ($device eq "");
+
+ # Exit if wpa_supplicant is not running on this interface.
+ #return if (! -e "/var/run/wpa_supplicant/$device");
+
+ open(FILE, "/usr/local/bin/wirelessclient status |");
+
+ my %status = ();
+ while (<FILE>) {
+ chomp($_);
+
+ my ($key, $value) = split("=", $_);
+ $status{$key} = $value;
+ }
+
+ close(FILE);
+
+ # End here, if no there is no input.
+ return if (!keys %status);
+
+ &Header::openbox('100%', 'left', $Lang::tr{'status'});
+
+ if ($status{'ssid'} eq "") {
+ print "<p>$Lang::tr{'wlan client disconnected'}</p>";
+
+ } else {
+ print <<END;
+ <table width='100%'>
+ <tr>
+ <td width='20%'>
+ $Lang::tr{'wlan client ssid'}
+ </td>
+ <td width='80%'>
+ $status{'ssid'}
+ </td>
+ </tr>
+ <tr>
+ <td width='20%'>
+ $Lang::tr{'wlan client bssid'}
+ </td>
+ <td width='80%'>
+ $status{'bssid'}
+ </td>
+ </tr>
+END
+
+ if (($status{'pairwise_cipher'} ne "NONE") || ($status{'group_cipher'} ne "NONE")) {
+ print <<END;
+ <tr>
+ <td colspan='2'>
+ <strong>$Lang::tr{'wlan client encryption wpa'}</strong>
+ </td>
+ </tr>
+ <tr>
+ <td width='20%'>
+ $Lang::tr{'wlan client pairwise cipher'}
+ </td>
+ <td width='80%'>
+ $status{'pairwise_cipher'}
+ </td>
+ </tr>
+ <tr>
+ <td width='20%'>
+ $Lang::tr{'wlan client group cipher'}
+ </td>
+ <td width='80%'>
+ $status{'group_cipher'}
+ </td>
+ </tr>
+END
+ }
+
+ print "</table>";
+ }
+
+ &Header::closebox();
+}
+
+sub BuildConfiguration() {
+ system("/usr/local/bin/wirelessclient restart");
+}
+
+sub NextID() {
+ my $highest_id = 0;
+ foreach my $line (@configs) {
+ # Skip commented lines.
+ my $firstchar = substr($line, 0, 1);
+ next if ($firstchar eq "#");
+
+ my @config = split(/\,/, $line);
+ if ($config[0] > $highest_id) {
+ $highest_id = $config[0];
+ }
+ }
+
+ return $highest_id + 1;
+}
+
+sub DuplicateSSID($) {
+ my $ssid = shift;
+
+ foreach my $line (@configs) {
+ # Skip commented lines.
+ my $firstchar = substr($line, 0, 1);
+ next if ($firstchar eq "#");
+
+ my @config = split(/\,/, $line);
+ if ($config[5] eq $ssid) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+sub ValidKeyLength($$) {
+ my $algo = shift;
+ my $key = shift;
+
+ my $key_length = length($key);
+
+ if ($algo eq "WEP") {
+ # Key must be 13 or 26 characters.
+ if (($key_length == 13) || ($key_length == 26)) {
+ return 0;
+ }
+
+ return 1;
+
+ } elsif (($algo eq "WPA2") || ($algo eq "WPA")) {
+ # Key must be between 8 and 63 chars.
+ if (($key_length >= 8) && ($key_length <= 63)) {
+ return 0;
+ }
+
+ return 1;
+ }
+
+ # Say okay for all other algorithms.
+ return 0;
+}
+
+sub ValidateInput($) {
+ my $mode = shift;
+
+ # Check for duplicate SSIDs.
+ if (($mode eq "add") && (DuplicateSSID($settings{'SSID'}))) {
+ return "$Lang::tr{'wlan client duplicate ssid'}: $settings{'SSID'}";
+
+ # Check for invalid key length.
+ } elsif (ValidKeyLength($settings{'ENCRYPTION'}, $settings{'PSK'})) {
+ return "$Lang::tr{'wlan client invalid key length'}";
+
+ }
+
+ # Reset WPA mode, if WPA(2) is not selected.
+ if (($settings{'ENCRYPTION'} ne "WPA") && ($settings{'ENCRYPTION'} ne "WPA2")) {
+ $settings{'WPA_MODE'} = '';
+ }
+
+ if ($settings{'ENABLED'} ne "") {
+ $settings{'ENABLED'} = 'on';
+ } else {
+ $settings{'ENABLED'} = 'off';
+ }
+
+ return;
+}
'wireless config added' => 'Wireless-Konfiguration hinzugefügt',
'wireless config changed' => 'Wireless-Konfiguration geändert',
'wireless configuration' => 'Wireless-Konfiguration',
+'wlan client' => 'WLAN-Client',
+'wlan client advanced settings' => 'Erweiterte Einstellungen',
+'wlan client and' => 'und',
+'wlan client bssid' => 'BSSID',
+'wlan client ccmp' => 'CCMP',
+'wlan client configuration' => 'WLAN-Client-Konfiguration',
+'wlan client disconnected' => 'Nicht verbunden',
+'wlan client duplicate ssid' => 'Doppelte SSID',
+'wlan client edit entry' => 'Verbindung bearbeiten',
+'wlan client encryption' => 'Verschlüsselung',
+'wlan client encryption none' => 'Keine',
+'wlan client encryption wep' => 'WEP',
+'wlan client encryption wpa' => 'WPA',
+'wlan client encryption wpa2' => 'WPA2',
+'wlan client group cipher' => 'Gruppenchiffre',
+'wlan client group key algorithm' => 'GKA',
+'wlan client invalid key length' => 'Ungültige Schlüssellänge.',
+'wlan client new entry' => 'Neue WLAN-Client-Konfiguration erstellen',
+'wlan client new network' => 'Neues Netzwerk',
+'wlan client pairwise cipher' => 'Paarweise Chiffre',
+'wlan client pairwise key algorithm' => 'PKA',
+'wlan client pairwise key group key' => 'Paarweise-/Gruppenschlüssel',
+'wlan client psk' => 'Schlüssel',
+'wlan client ssid' => 'SSID',
+'wlan client tkip' => 'TKIP',
+'wlan client wpa mode' => 'WPA-Modus',
+'wlan client wpa mode all' => 'Automatisch',
+'wlan client wpa mode ccmp ccmp' => 'CCMP-CCMP',
+'wlan client wpa mode ccmp tkip' => 'CCMP-TKIP',
+'wlan client wpa mode tkip tkip' => 'TKIP-TKIP',
'wlanap access point' => 'Access Point',
'wlanap channel' => 'Kanal',
+'wlanap country' => 'Ländercode',
'wlanap debugging' => 'Debugging',
'wlanap del interface' => 'Ausgewähltes Interface zurücksetzen?',
'wlanap encryption' => 'Verschlüsselung',
'wireless config added' => 'Wireless config added',
'wireless config changed' => 'Wireless config changed',
'wireless configuration' => 'Wireless Configuration',
+'wlan client' => 'Wireless client',
+'wlan client advanced settings' => 'Advanced settings',
+'wlan client and' => 'and',
+'wlan client bssid' => 'BSSID',
+'wlan client ccmp' => 'CCMP',
+'wlan client configuration' => 'Wireless Client Configuration',
+'wlan client disconnected' => 'Disconnected',
+'wlan client duplicate ssid' => 'Duplicate SSID',
+'wlan client edit entry' => 'Edit wireless client configuration',
+'wlan client encryption' => 'Encryption',
+'wlan client encryption none' => 'None',
+'wlan client encryption wep' => 'WEP',
+'wlan client encryption wpa' => 'WPA',
+'wlan client encryption wpa2' => 'WPA2',
+'wlan client group cipher' => 'Group cipher',
+'wlan client group key algorithm' => 'GKA',
+'wlan client invalid key length' => 'Invalid key length.',
+'wlan client new entry' => 'Create new wireless client configuration',
+'wlan client new network' => 'New network',
+'wlan client pairwise cipher' => 'Pairwise cipher',
+'wlan client pairwise key algorithm' => 'PKA',
+'wlan client pairwise key group key' => 'Pairwise key/group key',
+'wlan client psk' => 'Pre-shared key',
+'wlan client ssid' => 'SSID',
+'wlan client tkip' => 'TKIP',
+'wlan client wpa mode' => 'WPA mode',
+'wlan client wpa mode all' => 'Auto',
+'wlan client wpa mode ccmp ccmp' => 'CCMP-CCMP',
+'wlan client wpa mode ccmp tkip' => 'CCMP-TKIP',
+'wlan client wpa mode tkip tkip' => 'TKIP-TKIP',
'wlanap access point' => 'Access Point',
'wlanap channel' => 'Channel',
'wlanap country' => 'Country Code',
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
for i in auth/users backup/include.user backup/exclude.user \
certs/index.txt ddns/config ddns/noipsettings ddns/settings ddns/ipcache dhcp/settings \
dhcp/fixleases dhcp/advoptions dhcp/dhcpd.conf.local dmzholes/config dns/settings ethernet/aliases ethernet/settings ethernet/known_nics ethernet/scanned_nics \
- extrahd/scan extrahd/devices extrahd/partitions extrahd/settings fwlogs/ipsettings fwlogs/portsettings \
+ ethernet/wireless extrahd/scan extrahd/devices extrahd/partitions extrahd/settings fwlogs/ipsettings fwlogs/portsettings \
isdn/settings mac/settings main/disable_nf_sip main/hosts main/routing main/settings net-traffic/settings optionsfw/settings outgoing/settings outgoing/rules \
ovpn/ccd.conf ovpn/ccdroute ovpn/ccdroute2 pakfire/settings portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings proxy/advanced/cre/enable remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
mv -v /usr/bin/ping /bin
+
+ # Don't use whois command from here.
+ rm -vf /usr/bin/whois
+
@rm -rf $(DIR_APP)
@$(POSTBUILD)
ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet
ln -sf ../init.d/sysctl /etc/rc.d/rcsysinit.d/S90sysctl
ln -sf ../init.d/network-vlans /etc/rc.d/rcsysinit.d/S91network-vlans
+ ln -sf ../init.d/wlanclient /etc/rc.d/rc0.d/K82wlanclient
+ ln -sf ../init.d/wlanclient /etc/rc.d/rc3.d/S19wlanclient
+ ln -sf ../init.d/wlanclient /etc/rc.d/rc6.d/K82wlanclient
ln -sf ../../dnsmasq /etc/rc.d/init.d/networking/red.up/05-RS-dnsmasq
ln -sf ../../firewall /etc/rc.d/init.d/networking/red.up/20-RL-firewall
--- /dev/null
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER = 4.0
+
+THISAPP = jwhois-$(VER)
+DL_FILE = $(THISAPP).tar.gz
+DL_FROM = $(URL_IPFIRE)
+DIR_APP = $(DIR_SRC)/$(THISAPP)
+TARGET = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 977d0ba90ee058a7998c94d933fc9546
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+ @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+ @$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+ @$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-conf_update.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-conf_update2.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-connect.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-fclose.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-idna.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-ipv6match.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-multi-homed.patch
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/jwhois-4.0-select.patch
+
+ cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc
+ cd $(DIR_APP) && make $(MAKETUNING)
+ cd $(DIR_APP) && make install
+
+ # Add alias for whois command.
+ ln -svf jwhois /usr/bin/whois
+
+ @rm -rf $(DIR_APP)
+ @$(POSTBUILD)
include Config
-VER = 4.8.8
+VER = 4.8.9
THISAPP = mc-$(VER)
DL_FILE = $(THISAPP).tar.xz
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = mc
-PAK_VER = 7
+PAK_VER = 8
DEPS = ""
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 14231665535fc80cc654b6ccfd070995
+$(DL_FILE)_MD5 = 0f8a05f9a9708241541ae177c8e2f209
install : $(TARGET)
NAME="IPFire" # Software name
SNAME="ipfire" # Short name
VERSION="2.13" # Version number
-CORE="70" # Core Level (Filename)
+CORE="71" # Core Level (Filename)
PAKFIRE_CORE="70" # Core Level (PAKFIRE)
GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch
SLOGAN="www.ipfire.org" # Software slogan
lfsmake2 gzip
lfsmake2 inetutils
lfsmake2 iproute2
+ lfsmake2 jwhois
lfsmake2 kbd
lfsmake2 less
lfsmake2 make
case "${1}" in
start)
+ # kill already running copy of dnsmasq...
+ killproc /usr/sbin/dnsmasq 2>&1 > /dev/null
+
boot_mesg "Starting Domain Name Service Proxy..."
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
--- /dev/null
+#!/bin/sh
+#
+########################################################################
+# Begin
+#
+# Description : A collection of functions for the IPFire network scripts
+#
+# Authors : IPFire Development Team <developers@ipfire.org>
+#
+# Version : 01.00
+#
+# Notes :
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+eval $(/usr/local/bin/readhash /var/ipfire/dns/settings)
+
+dhcpcd_get_pid() {
+ # This function returns the pid of a dhcpcd by a given
+ # network device, if a pidfile exists.
+
+ local device="$1"
+ local pidfile="/var/run/dhcpcd-${device}.pid"
+
+ # Check if a pid file exists.
+ if [ -f "${pidfile}" ] ; then
+
+ # Get the pid from the file.
+ local pid="$(<"${pidfile}")"
+
+ echo "${pid}"
+ fi
+}
+
+dhcpcd_is_running() {
+ # This functions checks if a dhcpcd is running by a given pid.
+
+ local pid="$1"
+
+ # Check if a dhcpcd is running.
+ if [ -n "${pid}" -a -d "/proc/${pid}" ]; then
+ # Return "0" (True) if a dhcpcd is running.
+ return 0
+ fi
+
+ # Return 1 (False) no dhcpcd is running.
+ return 1
+}
+
+dhcpcd_start() {
+ # This function will start a dhcpcd on a speciefied device.
+
+ local device="$1"
+ local dhcp_start=""
+
+ boot_mesg -n "Starting dhcpcd on the ${device} interface..."
+
+ # Check if a dhcpcd is already running.
+ local pid="$(dhcpcd_get_pid "${device}")"
+
+ if dhcpcd_is_running "${pid}"; then
+ boot_mesg "dhcpcd already running!" ${WARNING}
+ echo_warning
+ exit 2
+ fi
+
+ # Check if a DHCP hostname has been set.
+ if [ -n "${RED_DHCP_HOSTNAME}" ]; then
+ dhcp_start+="-h ${RED_DHCP_HOSTNAME}"
+ fi
+
+ # Start dhcpcd.
+ /sbin/dhcpcd "${device}" "${dhcp_start}" >/dev/null 2>&1
+ ret="$?"
+
+ if [ "${ret}" -eq 0 ]; then
+ . /var/ipfire/dhcpc/dhcpcd-"${device}".info
+ echo ""
+ echo_ok
+ boot_mesg " DHCP Assigned Settings for ${device}:"
+ boot_mesg_flush
+ boot_mesg " IP Address: $ip_address"
+ boot_mesg_flush
+
+ if [ -n "${RED_DHCP_HOSTNAME}" ]; then
+ boot_mesg " Hostname: $RED_DHCP_HOSTNAME"
+ boot_mesg_flush
+ fi
+
+ boot_mesg " Subnet Mask: $subnet_mask"
+ boot_mesg_flush
+ boot_mesg " Default Gateway: $routers"
+ boot_mesg_flush
+ boot_mesg " DNS Server: $domain_name_servers"
+ boot_mesg_flush
+ else
+ echo ""
+ $(exit "${ret}")
+ evaluate_retval
+ fi
+}
+
+dhcpcd_stop() {
+ # This function stops a previously started dhcpcd on a given device.
+
+ local device="$1"
+ local dhcp_stop="-k"
+ local leaseinfo="/var/ipfire/dhcpc/dhcpcd-${device}.info"
+
+ boot_mesg -n "Stopping dhcpcd on the ${device} interface..."
+
+ # Check if a dhcpcd is running.
+ local pid="$(dhcpcd_get_pid "${device}")"
+
+ if ! dhcpcd_is_running "${pid}"; then
+ boot_mesg " Not running." ${WARNING}
+ echo_warning
+ exit 1
+ fi
+
+ # Stop dhcpcd.
+ /sbin/dhcpcd "${device}" "${dhcp_stop}" &> /dev/null
+ ret="$?"
+
+ # Wait until dhcpd has stopped.
+ while [ -d "/proc/${pid}" ]; do
+ sleep 1
+ done
+
+ # Display console message, depended on the exit code
+ # of the stopped dhcpcd.
+ if [ "${ret}" -eq 0 ]; then
+ boot_mesg
+ echo_ok
+ elif [ "${ret}" -eq 1 ]; then
+ boot_mesg "failed to stop dhcpcd!" ${WARNING}
+ echo_warning
+ else
+ boot_mesg
+ echo_failure
+ fi
+}
. /etc/sysconfig/rc
. ${rc_functions}
+. /etc/init.d/networking/functions.network
#Define some defaults
INET_VLAN=7
fi
fi
-PIDFILE="/var/run/dhcpcd-${DEVICE}.pid"
-LEASEINFO="/var/ipfire/dhcpc/dhcpcd-${DEVICE}.info"
-DHCP_START=" "
-DHCP_STOP="-k "
-
case "${1}" in
start)
if [ "${DEVICE}" != "${GREEN_DEV}" ] && [ "${DEVICE}" != "" ]; then
/usr/local/bin/setaliases
elif [ "${TYPE}" == "DHCP" ]; then
+ # Add firewall rules to allow comunication with the dhcp server on red.
+ iptables -A REDINPUT -p tcp --source-port 67 --destination-port 68 -i ${DEVICE} -j ACCEPT
+ iptables -A REDINPUT -p udp --source-port 67 --destination-port 68 -i ${DEVICE} -j ACCEPT
- if [ -e $LEASEINFO ]; then
- boot_mesg -n "Stopping dhcpcd on the ${DEVICE} interface..."
- . $LEASEINFO
- if [ "$dhcp_lease_time" = "4294967295" ]; then
- # do nothing, just echo ok
- echo ""
- echo_ok
- else
- if [ -n "$DHCP_STOP" ]; then
- /sbin/dhcpcd ${DEVICE} $DHCP_STOP &> /dev/null
- RET="$?"
- if [ "$RET" -eq 0 ]; then
- echo ""
- echo_ok
- elif [ "$RET" -eq 1 ]; then
- boot_mesg "dhcpcd not running!" ${WARNING}
- echo_warning
- else
- echo ""
- echo_failure
- fi
- else
- echo ""
- killproc dhcpcd
- fi
- fi
- fi
-
- boot_mesg -n "Starting dhcpcd on the ${DEVICE} interface..."
echo -n "${DEVICE}" > /var/ipfire/red/iface
+ # Check if the wlan-client is used on red.
+ # To determine this we check if a wpa_supplicant is running.
+ pid="$(pidof wpa_supplicant)"
+
+ if [ -z "${pid}" ]; then
+ # No wpa_supplicant is running. So it's save to start dhcpcd.
+ dhcpcd_start "${DEVICE}"
+ fi
+
## Create & Enable vnstat
/usr/bin/vnstat -u -i ${DEVICE} -r --enable --force > /dev/null 2>&1
- # Test to see if there is a stale pid file
- if [ -f "$PIDFILE" ]; then
- ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
- if [ $? != 0 ]; then
- rm -f /var/run/dhcpcd-${DEVICE}.pid > /dev/null
- else
- boot_mesg "dhcpcd already running!" ${WARNING}
- echo_warning
- exit 2
- fi
- fi
-
- iptables -A REDINPUT -p tcp --source-port 67 --destination-port 68 -i ${DEVICE} -j ACCEPT
- iptables -A REDINPUT -p udp --source-port 67 --destination-port 68 -i ${DEVICE} -j ACCEPT
-
- if [ -n "${RED_DHCP_HOSTNAME}" ]; then
- DHCP_START+="-h ${RED_DHCP_HOSTNAME} "
- fi
-
- /sbin/dhcpcd ${DEVICE} ${DHCP_START} >/dev/null 2>&1
- RET="$?"
-
- if [ "$RET" = "0" ]; then
- . /var/ipfire/dhcpc/dhcpcd-${DEVICE}.info
- echo ""
- echo_ok
- boot_mesg " DHCP Assigned Settings for ${DEVICE}:"
- boot_mesg_flush
- boot_mesg " IP Address: $ip_address"
- boot_mesg_flush
- if [ -n "${RED_DHCP_HOSTNAME}" ]; then
- boot_mesg " Hostname: $RED_DHCP_HOSTNAME"
- boot_mesg_flush
- fi
- boot_mesg " Subnet Mask: $subnet_mask"
- boot_mesg_flush
- boot_mesg " Default Gateway: $routers"
- boot_mesg_flush
- boot_mesg " DNS Server: $domain_name_servers"
- boot_mesg_flush
- else
- echo ""
- $(exit "$RET")
- evaluate_retval
- fi
-
elif [ "$TYPE" == "PPPOE" ]; then
if ( ps ax | grep -q [p]ppd ); then
### Standard PPP options we always use
#
PPP_STD_OPTIONS="$PLUGOPTS $DNS defaultroute noipdefault noauth"
- PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach mtu ${MTU}"
+ PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach"
PPP_STD_OPTIONS+=" mru ${MRU} noaccomp nodeflate nopcomp novj novjccomp"
PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20"
PPP_STD_OPTIONS+=" lcp-echo-failure 5 ${AUTH}"
+
+ if [ -n "${MTU}" ]; then
+ PPP_STD_OPTIONS="${PPP_STD_OPTIONS} mtu ${MTU}"
+ fi
+
+ if [ -n "${MRU}" ]; then
+ PPP_STD_OPTIONS="${PPP_STD_OPTIONS} mru ${MRU}"
+ fi
### Debugging
#
# Add a NaN value to ppp0 rrd to supress spikes at reconnect
rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \
$(date +%s):: > /dev/null 2>&1
- fi
- if [ -e $LEASEINFO ]; then
- boot_mesg -n "Stopping dhcpcd on the ${DEVICE} interface..."
- . $LEASEINFO
- if [ "$dchp_lease_time" = "4294967295" ]; then
- # do nothing, just echo ok
- echo ""
- echo_ok
- else
- if [ -n "$DHCP_STOP" ]; then
- /sbin/dhcpcd ${DEVICE} $DHCP_STOP &> /dev/null
- RET="$?"
- if [ "$RET" -eq 0 ]; then
- echo ""
- echo_ok
- elif [ "$RET" -eq 1 ]; then
- boot_mesg "dhcpcd not running!" ${WARNING}
- echo_warning
- else
- echo ""
- echo_failure
- fi
- else
- echo ""
- killproc dhcpcd
- fi
+ elif [ "$TYPE" == "DHCP" ]; then
+ # Check if the wlan-client is used on red.
+ # To determine this we check if a wpa_supplicant is running.
+ pid="$(pidof wpa_supplicant)"
+
+ if [ -z "${pid}" ]; then
+ # Stop dhcpcd.
+ dhcpcd_stop "${DEVICE}"
fi
fi
--- /dev/null
+#!/bin/bash
+########################################################################
+# Begin
+#
+# Description : wpa_supplicant Script
+#
+# Authors : IPFire Development Team <developers@ipfire.org>
+#
+# Version : 01.00
+#
+# Notes : This script starts/stops the dhclient if a WPA/WPA2
+# connection to an AP successfull has been established
+# or disconnected.
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+. /etc/init.d/networking/functions.network
+
+# Gather required information from wpa_cli.
+device="$1"
+wpa_state="$2"
+
+# Check if the RED device has been configured to use DHCP or exit immediately.
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+if [ ! "${RED_TYPE}" == "DHCP" ] ; then
+ exit 0
+fi
+
+case "${wpa_state}" in
+ CONNECTED)
+ # Start dhcpcd.
+ dhcpcd_start "${device}"
+
+ exit 0
+ ;;
+
+ DISCONNECTED)
+ # Stop dhcpcd.
+ dhcpcd_stop "${device}"
+
+ exit 0
+ ;;
+
+ *)
+ # When we ever got here, there is a really big problem.
+ exit 1
+ ;;
+esac
--- /dev/null
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/wlan_client
+#
+# Description : Wireless client initscript
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+
+WIRELESS_CONFIG="/var/ipfire/ethernet/wireless"
+
+function device_is_wireless() {
+ local device=${1}
+
+ if [ -d "/sys/class/net/${device}/wireless" ]; then
+ return 0
+ fi
+
+ return 1
+}
+
+function wpa_supplicant_make_config() {
+ local device=${1}
+ local config=${2}
+ shift 2
+
+ # Check if device is wireless.
+ local wireless="false"
+ if device_is_wireless ${device}; then
+ wireless="true"
+ fi
+
+ # Write a configuration file header.
+ (
+ echo "#"
+ echo "# THIS FILE IS AUTOMATICALLY GENERATED AND"
+ echo "# ANY CUSTOM CHANGES WILL BE OVERWRITTEN!"
+ echo "#"
+ echo
+ echo "ctrl_interface=/var/run/wpa_supplicant"
+ echo
+ ) > ${config}
+
+ local items=0
+
+ local line
+ while IFS="," read -ra line; do
+ # Skip commented lines.
+ [ "${line:0:1}" = "#" ] && continue
+
+ # Skip disabled entries.
+ [ "${line[2]}" = "on" ] || continue
+
+ wpa_supplicant_config_line \
+ ${device} ${config} \
+ --wireless="${wireless}" \
+ --mode="${line[3]}" \
+ --wpa-mode="${line[4]}" \
+ --ssid="${line[5]}" \
+ --psk="${line[6]}" \
+ --priority="${line[7]}"
+
+ items=$(( ${items} + 1 ))
+
+ done < ${WIRELESS_CONFIG}
+
+ # Return exit code 2, when there are no entries in the
+ # configuration file.
+ if [ "${items}" = "0" ]; then
+ return 2
+ fi
+
+ return 0
+}
+
+function wpa_supplicant_config_line() {
+ local device=${1}
+ local config=${2}
+ shift 2
+
+ local auth_alg
+ local proto
+ local key_mgmt
+ local pairwise
+ local group
+ local mode
+ local priority
+ local psk
+ local ssid
+ local wep_tx_keyidx
+ local wep_key0
+ local wireless="true"
+ local wpa_mode
+
+ while [ $# -gt 0 ]; do
+ case "${1}" in
+ --mode=*)
+ mode=${1#--mode=}
+ ;;
+ --priority=*)
+ priority=${1#--priority=}
+ ;;
+ --psk=*)
+ psk=${1#--psk=}
+ ;;
+ --ssid=*)
+ ssid=${1#--ssid=}
+ ;;
+ --wireless=*)
+ wireless=${1#--wireless=}
+ ;;
+ --wpa-mode=*)
+ wpa_mode=${1#--wpa-mode=}
+ ;;
+ esac
+ shift
+ done
+
+ case "${mode}" in
+ WPA2)
+ auth_alg="OPEN"
+ proto="RSN"
+ key_mgmt="WPA-PSK"
+ ;;
+ WPA)
+ auth_alg="OPEN"
+ proto="WPA"
+ key_mgmt="WPA-PSK"
+ ;;
+ WEP)
+ auth_alg="SHARED"
+ key_mgmt="NONE"
+
+ wep_tx_keyidx=0
+ wep_key0=${psk}
+ psk=""
+ ;;
+ NONE)
+ auth_alg="OPEN"
+ key_mgmt="NONE"
+ ;;
+ *)
+ # Unsupported mode.
+ return 1
+ ;;
+ esac
+
+ if [ "${mode}" = "WPA" -o "${mode}" = "WPA2" ]; then
+ case "${wpa_mode}" in
+ CCMP-CCMP)
+ pairwise="CCMP"
+ group="CCMP"
+ ;;
+ CCMP-TKIP)
+ pairwise="CCMP"
+ group="TKIP"
+ ;;
+ TKIP-TKIP)
+ pairwise="TKIP"
+ group="TKIP"
+ ;;
+ *)
+ pairwise="CCMP TKIP"
+ group="CCMP TKIP"
+ ;;
+ esac
+ fi
+
+ (
+ echo "network={"
+
+ if [ -n "${ssid}" ]; then
+ echo " ssid=\"${ssid}\""
+ fi
+ if [ "${wireless}" = "true" ]; then
+ echo " scan_ssid=1"
+ fi
+ if [ -n "${auth_alg}" ]; then
+ echo " auth_alg=${auth_alg}"
+ fi
+ if [ -n "${key_mgmt}" ]; then
+ echo " key_mgmt=${key_mgmt}"
+ fi
+ if [ -n "${psk}" ]; then
+ echo " psk=\"${psk}\""
+ fi
+ if [ -n "${wep_tx_keyidx}" ]; then
+ echo " wep_tx_keyidx=${wep_tx_keyidx}"
+ fi
+ if [ -n "${wep_key0}" ]; then
+ echo " wep_key0=\"${wep_key0}\""
+ fi
+ if [ -n "${proto}" ]; then
+ echo " proto=${proto}"
+ fi
+ if [ -n "${pairwise}" -a -n "${group}" ]; then
+ echo " pairwise=${pairwise}"
+ echo " group=${group}"
+ fi
+ if [ -n "${priority}" ]; then
+ echo " priority=${priority}"
+ fi
+
+ echo "}"
+ echo
+ ) >> ${config}
+}
+
+function wpa_supplicant_start() {
+ local device=${1}
+ local config="/etc/wpa_supplicant.conf"
+
+ # Write configuration file.
+ wpa_supplicant_make_config ${device} ${config}
+ [ $? -eq 0 ] || return 0
+
+ # Build wpa_supplicant command line.
+ local wpa_suppl_cmd="wpa_supplicant -B -qqq -i${device} -c${config}"
+
+ if device_is_wireless ${device}; then
+ wpa_suppl_cmd="${wpa_suppl_cmd} -Dwext"
+ else
+ wpa_suppl_cmd="${wpa_suppl_cmd} -Dwired"
+ fi
+
+ # Run the shiz.
+ boot_mesg "Starting wireless client on ${RED_DEV}..."
+ loadproc ${wpa_suppl_cmd}
+
+ # Run wpa_cli to handle reconnection events.
+ boot_mesg "Starting wireless event handler on ${RED_DEV}..."
+ wpa_cli -B -a /etc/rc.d/init.d/networking/wpa_supplicant.exe
+}
+
+function wpa_supplicant_stop() {
+ boot_mesg "Stopping wireless event handler on ${RED_DEV}..."
+ killproc wpa_cli
+
+ # wpa_cli does not send a disconnect event when get stopped.
+ # So we manually have to send it to the wpa_supplicant.exe.
+ /etc/rc.d/init.d/networking/wpa_supplicant.exe "${RED_DEV}" DISCONNECTED
+
+ boot_mesg "Stopping wireless client on ${RED_DEV}..."
+ killproc wpa_supplicant
+
+ # Tidy up /tmp directory.
+ rm -f /tmp/wpa_ctrl_*
+}
+
+case "${1}" in
+ start)
+ if [ -n "${RED_DEV}" ] && device_is_wireless ${RED_DEV}; then
+ wpa_supplicant_start ${RED_DEV}
+ fi
+ ;;
+
+ stop)
+ if [ -n "${RED_DEV}" ] && device_is_wireless ${RED_DEV}; then
+ wpa_supplicant_stop
+ fi
+ ;;
+
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ statusproc wpa_supplicant
+ ;;
+
+ *)
+ echo "Usage: ${0} {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/wlan_client
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes \
- getconntracktable
+ getconntracktable wirelessclient
+SUID_UPDX = updxsetperms
install : all
install -m 755 $(PROGS) /usr/local/bin
getconntracktable: getconntracktable.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ getconntracktable.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+
+wirelessclient: wirelessclient.c setuid.o ../install+setup/libsmooth/varval.o
+ $(COMPILE) -I../install+setup/libsmooth/ wirelessclient.c setuid.o ../install+setup/libsmooth/varval.o -o $@
--- /dev/null
+/* IPFire helper program - wirelessclient
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence. See the file COPYING for details.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "setuid.h"
+
+int main(int argc, char *argv[]) {
+ if (!(initsetuid()))
+ exit(1);
+
+ if (strcmp(argv[1], "restart") == 0) {
+ safe_system("/etc/rc.d/init.d/wlanclient restart >/dev/null 2>&1");
+ return 0;
+ }
+
+ if (strcmp(argv[1], "status") == 0) {
+ safe_system("/usr/sbin/wpa_cli status verbose");
+ return 0;
+ }
+
+ return 0;
+}
--- /dev/null
+diff -up jwhois-4.0/example/jwhois.conf.orig jwhois-4.0/example/jwhois.conf
+--- jwhois-4.0/example/jwhois.conf.orig 2007-03-26 11:12:08.000000000 +0200
++++ jwhois-4.0/example/jwhois.conf 2010-12-20 14:26:06.450882316 +0100
+@@ -17,6 +17,11 @@ whois-servers {
+ type = regex;
+
+ #
++ # Catch ENUM domains
++ #
++ "\\([0-9]\\.\\)+e164\\.arpa" = "struct enum-blocks";
++
++ #
+ # You can use the special value `struct' to redirect the query
+ # to another block which optionally can use another type of matching.
+ # Here we use it to have IPv4 numbers matched using CIDR blocks instead
+@@ -27,6 +32,7 @@ whois-servers {
+ "^CORE-[0-9]+$" = "struct handles";
+ "^CO[CH]O-[0-9]+$" = "struct handles";
+ ".*-[A-Z]+$" = "struct handles";
++ ".*-6BONE$" = "struct handles";
+
+ #
+ # Catch AS numbers
+@@ -81,6 +87,7 @@ whois-servers {
+ # Pseudo-ccTLDs must be listed above gTLDs
+ #
+ "\\.ae\\.org$" = "whois.centralnic.net";
++ "\\.ar\\.com$" = "whois.centralnic.com";
+ "\\.br\\.com$" = "whois.centralnic.net";
+ "\\.cn\\.com$" = "whois.centralnic.net";
+ "\\.de\\.com$" = "whois.centralnic.net";
+@@ -103,17 +110,30 @@ whois-servers {
+ "\\.uy\\.com$" = "whois.centralnic.net";
+ "\\.web\\.com$" = "whois.centralnic.net";
+ "\\.za\\.com$" = "whois.centralnic.net";
++ "\\.za\\.net$" = "whois.za.net";
++ "\\.za\\.org$" = "whois.za.org";
+
+ "\\.ac$" = "whois.nic.ac";
+- "\\.ae$" = "whois.uaenic.ae";
++ "\\.ae$" = "whois.aeda.net.ae";
++ "\\.co\\.ae$" = "whois.aeda.net.ae";
++ "\\.net\\.ae$" = "whois.aeda.net.ae";
++ "\\.org\\.ae$" = "whois.aeda.net.ae";
++ "\\.sch\\.ae$" = "whois.aeda.net.ae";
++ "\\.ac\\.ae$" = "whois.aeda.net.ae";
++ "\\.mil\\.ae$" = "whois.aeda.net.ae";
++ "\\.gov\\.ae$" = "whois.aeda.net.ae";
++ "\\.1\\.7\\.9\\.e164\\.arpa$" = "whois.aeda.net.ae";
+ "\\.aero$" = "whois.aero";
+- "\\.af$" = "whois.nic.af";
++ "\\.af$" = "whois.cocca.cx";
+ "\\.ag$" = "whois.nic.ag";
+- "\\.ai$" = "whois.offshore.ai";
+- "\\.al$" = "whois.ripe.net";
++ "\\.ai$" = "whois.ai";
++ "\\.al$" = "www.ert.gov.al";
+ "\\.am$" = "whois.amnic.net";
++ "\\.edu\\.ar$" = "www.riu.edu.ar";
+ "\\.ar$" = "www.nic.ar";
++ "\\.arpa$" = "whois.iana.org";
+ "\\.as$" = "whois.nic.as";
++ "\\.asia$" = "whois.nic.asia";
+ "\\.at$" = "whois.nic.at";
+ "\\.asn\\.au$" = "whois.ausregistry.net.au";
+ "\\.com\\.au$" = "whois.ausregistry.net.au";
+@@ -125,30 +145,40 @@ whois-servers {
+ "\\.ba$" = "whois.ripe.net";
+ "\\.be$" = "whois.dns.be";
+ "\\.bg$" = "whois.register.bg";
+- "\\.bi$" = "www.nic.bi";
+- "\\.biz$" = "whois.neulevel.biz";
++ "\\.bi$" = "whois.nic.bi";
++ "\\.biz$" = "whois.biz";
+ "\\.bj$" = "whois.nic.bj";
+ "\\.bm$" = "rwhois.ibl.bm 4321";
++ "\\.bo$" = "whois.nic.bo";
+ "\\.br$" = "whois.nic.br";
++ "\\.bs$" = "www.register.bs";
+ "\\.bv$" = "whois.ripe.net";
+- "\\.by$" = "whois.ripe.net";
++ "\\.by$" = "www.domain.by";
+ "\\.bz$" = "whois.belizenic.bz";
++ "\\.co\\.ca$" = "whois.co.ca";
+ "\\.ca$" = "whois.cira.ca";
+ "\\.cat$" = "whois.cat";
+- "\\.cc$" = "whois.nic.cc";
++ "\\.cc$" {
++ whois-server = "ccwhois.verisign-grs.com";
++ query-format = "domain $*";
++ }
+ "\\.cd$" = "whois.nic.cd";
+ "\\.cg$" = "www.nic.cg";
+ "\\.ch$" = "whois.nic.ch";
+ "\\.ci$" = "whois.nic.ci";
+ "\\.ck$" = "whois.nic.ck";
+ "\\.cl$" = "whois.nic.cl";
++ "\\.co\\.cm$" = "whois.netcom.cm";
++ "\\.com\\.cm$" = "whois.netcom.cm";
++ "\\.net\\.cm$" = "whois.netcom.cm";
+ "\\.edu\\.cn$" = "whois.edu.cn";
+- "\\.cn$" = "whois.cnnic.net.cn";
++ "\\.cn$" = "whois.cnnic.cn";
+ "\\.com$" {
+ whois-server = "whois.verisign-grs.com";
+ query-format = "domain $*";
+ }
+ "\\.coop$" = "whois.nic.coop";
++ "\\.cu$" = "www.nic.cu";
+ "\\.cx$" = "whois.nic.cx";
+ "\\.cy$" = "whois.ripe.net";
+ "\\.cz$" = "whois.nic.cz";
+@@ -156,12 +186,15 @@ whois-servers {
+ whois-server = "whois.denic.de";
+ query-format = "-C UTF-8 -T dn,ace $*";
+ }
+- "\\.dk$" = "whois.dk-hostmaster.dk";
++ "\\.dk$" {
++ whois-server = "whois.dk-hostmaster.dk";
++ query-format = "--show-handles $*";
++ }
+ "\\.dm$" = "whois.nic.dm";
+ "\\.do$" = "whois.nic.do";
+- "\\.dz$" = "whois.ripe.net";
++ "\\.dz$" = "www.nic.dz";
+ "\\.ec$" = "www.nic.ec";
+- "\\.edu$" = "whois.educause.net";
++ "\\.edu$" = "whois.educause.edu";
+ "\\.ee$" = "whois.eenet.ee";
+ "\\.eg$" = "whois.ripe.net";
+ "\\.es$" = "www.nic.es";
+@@ -171,17 +204,20 @@ whois-servers {
+ "\\.fm$" = "www.dot.fm";
+ "\\.fo$" = "whois.ripe.net";
+ "\\.fr$" = "whois.nic.fr";
+- "\\.gi$" = "www.nic.gi";
++ "\\.gd$" = "whois.adamsnames.com";
++ "\\.gi$" = "whois2.afilias-grs.net";
+ "\\.gov$" = "whois.nic.gov";
+- "\\.gg$" = "whois.isles.net";
++ "\\.gg$" = "whois.gg";
+ "\\.gm$" = "whois.ripe.net";
+ "\\.gp$" = "whois.nic.gp";
+ "\\.gr$" = "whois.ripe.net";
+- "\\.gs$" = "203.119.12.22";
++ "\\.gs$" = "whois.nic.gs";
+ "\\.gt$" = "www.gt";
+- "\\.hk$" = "whois.hkdnr.net.hk";
++ "\\.hk$" = "whois.hkirc.hk";
+ "\\.hm$" = "whois.registry.hm";
++ "\\.hn$" = "whois2.afilias-grs.net";
+ "\\.hr$" = "www.dns.hr";
++ "\\.ht$" = "whois.nic.ht";
+ "\\.hu$" = "whois.nic.hu";
+ "\\.id$" = "whois.idnic.net.id";
+ "\\.ie$" = "whois.domainregistry.ie";
+@@ -195,69 +231,94 @@ whois-servers {
+ "\\.is$" = "whois.isnic.is";
+ "\\.it$" = "whois.nic.it";
+ "\\.je$" = "whois.isles.net";
++ "\\.jobs$" {
++ whois-server = "jobswhois.verisign-grs.com";
++ query-format = "domain $*";
++ }
+ "\\.jp$" {
+ whois-server = "whois.jprs.jp";
+ query-format = "$* /e";
+ }
++ "\\.ke$" = "whois.kenic.or.ke";
++ "\\.kp$" = "whois.kcce.kp";
+ "\\.kg$" = "whois.domain.kg";
+- "\\.ki$" = "whois.nic.ki";
++ "\\.ki$" = "whois.cocca.cx";
+ "\\.kr$" = "whois.krnic.net";
+ "\\.kz$" = "whois.nic.kz";
+ "\\.la$" = "whois.nic.la";
+ "\\.lb$" = "cgi.aub.edu.lb";
++ "\\.lc$" = "whois2.afilias-grs.net";
+ "\\.li$" = "whois.nic.li";
+ "\\.lk$" = "whois.nic.lk";
+ "\\.lt$" = "whois.domreg.lt";
+ "\\.lu$" = "whois.dns.lu";
+ "\\.lv$" = "whois.nic.lv";
+ "\\.ly$" = "whois.nic.ly";
+- "\\.ma$" = "whois.ripe.net";
++ "\\.ma$" = "whois.iam.net.ma";
++ "\\.md$" = "whois.nic.md";
++ "\\.me$" = "whois.nic.me";
+ "\\.mil$" = "whois.nic.mil";
+ "\\.mk$" = "whois.ripe.net";
+ "\\.mm$" = "whois.nic.mm";
++ "\\.mn$" = "whois2.afilias-grs.net";
+ "\\.mobi$" = "whois.dotmobiregistry.net";
+- "\\.ms$" = "whois.adamsnames.tc";
+- "\\.mt$" = "www.um.edu.mt";
++ "\\.ms$" = "whois.nic.ms";
++ "\\.mt$" = "whois.nic.org.mt";
+ "\\.mu$" = "whois.nic.mu";
+ "\\.museum$" = "whois.museum";
+ "\\.mw$" = "www.tarsus.net";
+ "\\.mx$" = "whois.nic.mx";
+- "\\.my$" = "whois.mynic.net.my";
++ "\\.my$" = "whois.domainregistry.my";
+ "\\.na$" = "whois.na-nic.com.na";
+- "\\.name$" = "whois.nic.name";
++ "\\.name$" {
++ whois-server = "whois.nic.name";
++ query-format = "domain = $*";
++ }
+ "\\.net$" {
+ whois-server = "whois.verisign-grs.com";
+ query-format = "domain $*";
+ }
+- "\\.ng$" = "whois.rg.net";
++ "\\.nf$" = "whois.cocca.cx";
++ "\\.ng$" = "whois.nic.net.ng";
+ "\\.nl$" = "whois.domain-registry.nl";
+ "\\.no$" = "whois.norid.no";
+ "\\.nu$" = "whois.nic.nu";
+ "\\.nz$" = "whois.srs.net.nz";
+ "\\.org$" = "whois.publicinterestregistry.net";
+- "\\.pe$" = "whois.nic.pe";
++ "\\.pa$" = "www.nic.pa";
++ "\\.pe$" = "kero.yachay.pe";
+ "\\.pk$" = "pknic.net.pk";
+ "\\.pl$" = "whois.dns.pl";
+ "\\.pm$" = "whois.nic.pm";
++ "\\.pr$" = "whois.nic.pr";
+ "\\.pro$" = "whois.registrypro.pro";
++ "\\.ps$" = "www.nic.ps";
+ "\\.pt$" = "whois.dns.pt";
+ "\\.pw$" = "whois.nic.pw";
+ "\\.re$" = "whois.nic.re";
+ "\\.ro$" = "whois.rotld.ro";
++ "\\.edu\.ru$" = "whois.informika.ru";
+ "\\.ru$" = "whois.ripn.net";
+ "\\.rw$" = "www.nic.rw";
+ "\\.sa$" = "saudinic.net.sa";
++ "\\.sb$" = "whois.nic.sb";
++ "\\.sc$" = "whois2.afilias-grs.net";
+ "\\.se$" = "whois.iis.se";
+- "\\.sg$" = "whois.nic.net.sg";
++ "\\.sg$" = "whois.sgnic.sg";
+ "\\.sh$" = "whois.nic.sh";
+ "\\.si$" = "whois.arnes.si";
+ "\\.sj$" = "whois.ripe.net";
+- "\\.sk$" = "whois.ripe.net";
++ "\\.sk$" = "whois.sk-nic.sk";
++ "\\.sl$" = "whois.nic.sl";
+ "\\.sm$" = "whois.ripe.net";
++ "\\.sn$" = "whois.nic.sn";
++ "\\.so$" = "whois.nic.so";
+ "\\.sr$" = "whois.register.sr";
+ "\\.st$" = "whois.nic.st";
+ "\\.su$" = "whois.ripn.net";
++ "\\.sv$" = "www.svnet.org.sv";
+ "\\.tc$" = "whois.adamsnames.tc";
++ "\\.tel$" = "whois.nic.tel";
+ "\\.tf$" = "whois.afnic.fr";
+ "\\.tg$" = "www.nic.tg";
+ "\\.th$" = "whois.thnic.net";
+@@ -268,8 +329,12 @@ whois-servers {
+ "\\.tn$" = "whois.ripe.net";
+ "\\.to$" = "whois.tonic.to";
+ "\\.tr$" = "whois.nic.tr";
++ "\\.travel$" = "whois.nic.travel";
+ "\\.tt$" = "www.nic.tt";
+- "\\.tv$" = "whois.nic.tv";
++ "\\.tv$" {
++ whois-server = "tvwhois.verisign-grs.com";
++ query-format = "domain $*";
++ }
+ "\\.tw$" = "whois.twnic.net";
+ "\\.ua$" = "whois.com.ua";
+ "\\.ug$" = "whois.co.ug";
+@@ -279,9 +344,12 @@ whois-servers {
+ "\\.fed\\.us$" = "whois.nic.gov";
+ "\\.us$" = "whois.nic.us";
+ "\\.com\\.uy$" = "dns.antel.net.uy";
+- "\\.uy$" = "www.rau.edu.uy"; # is a whois server
+- "\\.uz$" = "www.noc.uz";
++ "\\.uy$" = "whois.nic.org.uy";
++ "\\.co\\.uz$" = "whois.reg.uz";
++ "\\.com\\.uz$" = "whois.reg.uz";
++ "\\.uz$" = "whois.cctld.uz";
+ "\\.va$" = "whois.ripe.net";
++ "\\.vc$" = "whois2.afilias-grs.net";
+ "\\.ve$" = "whois.nic.ve";
+ "\\.vi$" = "www.nic.vi";
+ "\\.vg$" = "whois.adamsnames.tc";
+@@ -289,12 +357,15 @@ whois-servers {
+ "\\.vu$" = "www.vunic.vu";
+ "\\.wf$" = "whois.nic.wf";
+ "\\.ws$" = "whois.worldsite.ws";
++ "\\.xn--mgbaam7a8h$" = "whois.aeda.net.ae";
+ "\\.yt$" = "whois.nic.yt";
+- "\\.yu$" = "whois.ripe.net";
++ "\\.yu$" = "www.nic.yu";
+ "\\.ac\\.za$" = "whois.ac.za";
+ "\\.org\\.za$" = "rwhois.org.za 4321";
+ "\\.co\\.za$" = "whois.co.za";
++ "\\.nom\\.za$" = "www.nom.za";
+ # "\\.za$" = "whois.frd.ac.za";
++ "\\.co\\.zw$" = "www.zispa.co.zw";
+
+ #
+ # Specify different port numbers to connect to by postfixing the IP
+@@ -311,6 +382,16 @@ whois-servers {
+ }
+
+ #
++# enum-blocks
++#
++enum-blocks {
++ type = regex;
++
++ "\\.9\\.4\\.e164\\.arpa$" = "whois.enum.denic.de";
++ "\\.1\\.6\\.e164\\.arpa$" = "whois-check.enum.com.au";
++}
++
++#
+ # cidr-blocks contains a list of all known CIDR blocks assigned to
+ # RIPE or APNIC. Default all queries to ARIN which has most other blocks.
+ #
+@@ -580,7 +661,7 @@ cidr-blocks {
+ cidr6-blocks {
+ type = cidr6;
+
+- "2001:0000::/23" = "whois.iana.org";
++ "2001:0000::/23" = "whois.iana.org"; # correct, but nothing usable is returned
+ "2001:0200::/23" = "whois.apnic.net";
+ "2001:0400::/23" = "whois.arin.net";
+ "2001:0600::/23" = "whois.ripe.net";
+@@ -593,13 +674,13 @@ cidr6-blocks {
+ "2001:1600::/23" = "whois.ripe.net";
+ "2001:1800::/23" = "whois.arin.net";
+ "2001:1A00::/23" = "whois.ripe.net";
+- "2001:1C00::/23" = "whois.ripe.net";
+- "2001:1E00::/23" = "whois.ripe.net";
++ "2001:1C00::/22" = "whois.ripe.net";
+ "2001:2000::/20" = "whois.ripe.net";
+ "2001:3000::/21" = "whois.ripe.net";
+ "2001:3800::/22" = "whois.ripe.net";
++ "2001:3C00::/22" = "whois.arin.net"; # not correct, but shows better information
+ "2001:4000::/23" = "whois.ripe.net";
+- "2001:4200::/23" = "whois.arin.net";
++ "2001:4200::/23" = "whois.afrinic.net";
+ "2001:4400::/23" = "whois.apnic.net";
+ "2001:4600::/23" = "whois.ripe.net";
+ "2001:4800::/23" = "whois.arin.net";
+@@ -610,23 +691,47 @@ cidr6-blocks {
+ "2001:A000::/20" = "whois.apnic.net";
+ "2001:B000::/20" = "whois.apnic.net";
+
++ "2002:0000::/16" = "whois.arin.net"; # not correct, but shows better information
++
+ "2003:0000::/18" = "whois.ripe.net";
+
+- "2400:0000::/19" = "whois.apnic.net";
+- "2400:2000::/19" = "whois.apnic.net";
+- "2400:4000::/21" = "whois.apnic.net";
+- "2404:0000::/23" = "whois.apnic.net";
+-
+- "2600:0000::/22" = "whois.arin.net";
+- "2604:0000::/22" = "whois.arin.net";
+- "2608:0000::/22" = "whois.arin.net";
+- "260C:0000::/22" = "whois.arin.net";
++ "2400:0000::/12" = "whois.apnic.net";
++
++ "2600:0000::/12" = "whois.arin.net";
+ "2610:0000::/23" = "whois.arin.net";
++ "2620:0000::/23" = "whois.arin.net";
++
++ "2800:0000::/12" = "whois.lacnic.net";
+
+- "2800:0000::/23" = "whois.lacnic.net";
++ "2C00:0000::/12" = "whois.afrinic.net";
+
+- "2A00:0000::/21" = "whois.ripe.net";
+- "2A01:0000::/16" = "whois.ripe.net";
++ #
++ # IPv6 blocks by carriers used for SixXS;
++ # see e.g. http://www.sixxs.net/pops/
++ #
++ "2001:0610::/32" = "whois.sixxs.net";
++ "2001:06A0::/32" = "whois.sixxs.net";
++ "2001:06A8::/32" = "whois.sixxs.net";
++ "2001:06F8::/32" = "whois.sixxs.net";
++ "2001:0770::/32" = "whois.sixxs.net";
++ "2001:07B8::/32" = "whois.sixxs.net";
++ "2001:0808::/32" = "whois.sixxs.net";
++ "2001:0838::/32" = "whois.sixxs.net";
++ "2001:0960::/32" = "whois.sixxs.net";
++ "2001:0A60::/32" = "whois.sixxs.net";
++ "2001:0AD0::/32" = "whois.sixxs.net";
++ "2001:0B18::/32" = "whois.sixxs.net";
++ "2001:1418::/32" = "whois.sixxs.net";
++ "2001:14B8::/32" = "whois.sixxs.net";
++ "2001:15C0::/32" = "whois.sixxs.net";
++ "2001:16D8::/32" = "whois.sixxs.net";
++ "2001:1938::/32" = "whois.sixxs.net";
++ "2001:4830::/32" = "whois.sixxs.net";
++ "2001:4978::/32" = "whois.sixxs.net";
++ "2001:41E0::/32" = "whois.sixxs.net";
++ "2001:4428::/32" = "whois.sixxs.net";
++ "2A01:0198::/32" = "whois.sixxs.net";
++ "2A01:0348::/32" = "whois.sixxs.net";
+
+ #
+ # Experimental IPv6 network 6bone (RFC2471)
+@@ -662,7 +767,7 @@ handles {
+ ".*-NICAT$" = "whois.nic.at";
+ ".*-CZ$" = "whois.nic.cz";
+ ".*-NICIR$" = "whois.nic.ir";
+- ".*-UYNIC$" = "www.rau.edu.uy";
++ ".*-UYNIC$" = "whois.nic.org.uy";
+ ".*-ITNIC$" = "whois.nic.it";
+ ".*-FRNIC$" = "whois.nic.fr";
+ ".*-LACNIC$" = "whois.lacnic.net";
+@@ -671,6 +776,49 @@ handles {
+ whois-server = "saudinic.net.sa";
+ query-format = "PERSON $*";
+ }
++ ".*-SIXXS$" = "whois.sixxs.net";
++ ".*-6BONE$" = "whois.6bone.net";
++ ".*-IRNIC$" = "whois.nic.ir";
++ ".*-RIPN$" = "whois.ripn.net";
++ ".*-AFRINIC$" = "whois.afrinic.net";
++ "^C[0-9]+-LRMS$" {
++ whois-server = "whois.afilias.info";
++ query-format = "CONTACT ID $*";
++ }
++ "^D[0-9]+-LRMS$" {
++ whois-server = "whois.afilias.info";
++ query-format = "DOMAIN ID $*";
++ }
++ "^H[0-9]+-LRMS$" {
++ whois-server = "whois.afilias.info";
++ query-format = "HOST ID $*";
++ }
++ "^R[0-9]+-LRMS$" {
++ whois-server = "whois.afilias.info";
++ query-format = "REGISTRAR ID $*";
++ }
++ ".*-KENIC$" = "whois.kenic.or.ke";
++ ".*-UANIC$" = "whois.com.ua";
++ ".*-COOP$" {
++ whois-server = "whois.nic.coop";
++ query-format = "CONTACT $*";
++ }
++ ".*CONTACT-NAME$" {
++ whois-server = "whois.nic.name";
++ query-format = "contact = $*";
++ }
++ ".*REGISTRAR-NAME$" {
++ whois-server = "whois.nic.name";
++ query-format = "registrar = $*";
++ }
++ "^C[0-9]+-AERO$" {
++ whois-server = "whois.aero";
++ query-format = "CONTACT ID $*";
++ }
++ "^D[0-9]+-AERO$" {
++ whois-server = "whois.aero";
++ query-format = "DOMAIN ID $*";
++ }
+ }
+
+ #
+@@ -678,11 +826,6 @@ handles {
+ # each host.
+ #
+ server-options {
+- "rwhois\\.nic\\.ve" {
+- rwhois = true;
+- rwhois-display = "dump";
+- rwhois-limit = 10;
+- }
+ "rwhois\\.exodus\\.net" {
+ rwhois = true;
+ }
+@@ -754,13 +897,6 @@ server-options {
+ form-element = "name";
+ }
+
+- "www\\.um\\.edu\\.mt" {
+- http = "true";
+- http-method = "GET";
+- http-action = "/cgi-bin/nic/whois";
+- form-element = "domain";
+- }
+-
+ "www\\.gt" {
+ http = "true";
+ http-method = "GET";
+@@ -777,13 +913,6 @@ server-options {
+ query-format = "Upit=${+2}"; # All but last domain segment
+ }
+
+- "whois\\.offshore\\.ai" {
+- http = "true";
+- http-method = "POST";
+- http-action = "/cgi-bin/whois.pl";
+- form-element = "domain-name";
+- }
+-
+ "www\\.io\\.io" {
+ http = "true";
+ http-method = "GET";
+@@ -813,11 +942,12 @@ server-options {
+ form-element = "query";
+ }
+
+- "www\\.nic\\.bi" {
+- http = "true";
+- http-method = "POST";
+- http-action = "/cgi-bin/whoisbi.pl"; # Formatting problems in Lynx
+- form-element = "DOMAINWHOIS";
++ "whois\\.nic\\.bi" {
++ http = "true"; # I can't connect on port 43
++ http-method = "GET";
++ http-action = "/register/whois.hei";
++ form-element = "query";
++ form-extra = "type=domain";
+ }
+
+ "www\\.nic\\.cg" {
+@@ -848,13 +978,6 @@ server-options {
+ form-element = "name";
+ }
+
+- "www\\.noc\\.uz" {
+- http = "true";
+- http-method = "POST";
+- http-action = "/whois.php4";
+- form-element = "dname";
+- }
+-
+ "www\\.nic\\.vi" {
+ http = "true";
+ http-method = "POST";
+@@ -878,9 +1001,9 @@ server-options {
+
+ "www\\.nic\\.tg" {
+ http = "true";
+- http-method = "GET";
+- http-action = "/moteur/info_dom.php";
+- form-element = "domaine";
++ http-method = "POST";
++ http-action = "/nictg/indexplus.php?pg=verifdom&op=whois";
++ query-format = "tosearch=${+2}&typedom=.tg";
+ }
+
+ "cgi\\.aub\\.edu\\.lb" {
+@@ -910,33 +1033,152 @@ server-options {
+ form-element = "nombre";
+ }
+
+- "www\\.denic\\.de" {
+- http = "true";
+- http-method = "POST";
+- http-action = "/en/whois/data.jsp";
+- form-element = "domainname";
+- form-extra = "service=WhoisData&lang=en&submit=Accept";
+- }
+ "whois\\.denic\\.de" {
+ whois-server = "whois.denic.de";
+ query-format = "-C UTF-8 -T dn,ace $*";
+ answer-charset = "UTF-8";
+ }
++
++ "whois\\.enum\\.denic\\.de" {
++ whois-server = "whois.enum.denic.de";
++ query-format = "-C UTF-8 -T dn $*";
++ answer-charset = "UTF-8";
++ }
++
+ "whois\\.nic\\.ad\\.jp" {
+ query-format = "$*/e";
+ }
++
+ "whois\\.nic\\.ch" {
+ answer-charset = "UTF-8";
+ }
++
+ "whois\\.nic\\.li" {
+ answer-charset = "UTF-8";
+ }
++
+ "whois\\.centralnic\\.*" {
+ whois-redirect = ".*Whois Server: \\(.*\\)";
+ }
++
+ ".*\\.verisign-grs\\.com" {
+ whois-redirect = ".*Whois Server: \\(.*\\)";
+ }
++
++ "whois\\.sixxs\\.net" {
++ whois-redirect = ".*ReferralServer: whois:\/\/\\(.*\\)";
++ }
++
++ "whois2\\.afilias-grs\\.net" {
++ whois-redirect = "Whois Server:\\(.*\\)";
++ }
++
++ "whois\\.registrar\\.telekom\\.de" {
++ query-format = "full $*";
++ }
++
++ "whois\\.rrpproxy\\.net" {
++ answer-charset = "UTF-8";
++ }
++
++ "www\\.nom\\.za" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/do.php";
++ query-format = "chkDomain=${+3}&chkAvail=Check";
++ }
++
++ "www\\.nic\\.pa" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/egh/whois.php";
++ form-element = "nombre_d";
++ }
++
++ "www\\.nic\\.dz" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/index.php?option=com_content&task=view&id=37&Itemid=51";
++ form-element = "domain_name";
++ }
++
++ "www\\.nic\\.yu" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/cgi-bin/checkavail.cgi";
++ form-element = "domain";
++ }
++
++ "whois\\.dotster\\.com" {
++ answer-charset = "UTF-8";
++ }
++
++ "www\\.ert\\.gov\\.al" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/ert_eng/domain_res.html";
++ query-format = "Domain=${+2}";
++ }
++
++ "www\\.nic\\.cu" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/dom_det.php";
++ form-element = "domsrch";
++ }
++
++ "www\\.nic\\.ps" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/whois/domain_whois.php";
++ form-element = "dname";
++ }
++
++ "www\\.svnet\\.org\\.sv" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/registro/consultas/whois.php";
++ form-element = "subdominio";
++ }
++
++ "www\\.zispa\\.co\\.zw" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/cgi-bin/search";
++ form-element = "domain";
++ }
++
++ "www\\.riu\\.edu\\.ar" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/cgi-bin/verdom.pl.nuevo";
++ query-format = "username=${+3}";
++ }
++
++ "www\\.register\\.bs" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/cgi-bin/search.pl";
++ form-element = "name";
++ }
++
++ "www\\.domain\\.by" {
++ http = "true";
++ http-method = "POST";
++ http-action = "/cgi-bin/registry.cgi";
++ query-format = "domain=${+2}&lang=e&mode=slquest";
++ }
++
++ "www\\.nic\\.ac" {
++ http = "true";
++ http-method = "GET";
++ http-action = "/cgi-bin/whois";
++ form-element = "textfield";
++ }
++
++ "whois\\.1api\\.net" {
++ answer-charset = "UTF-8";
++ }
+ }
+
+ #
--- /dev/null
+Patch by Robert Scheck <robert@fedoraproject.org> for jwhois >= 4.0, which adds various new
+IDN top-level-domains, updates some whois servers of ccTLDs and corrects the answer charset
+setting for some whois servers, too.
+
+--- jwhois-4.0/example/jwhois.conf 2011-05-22 20:36:19.000000000 +0200
++++ jwhois-4.0/example/jwhois.conf.conf_update2 2011-05-22 23:46:21.000000000 +0200
+@@ -122,7 +122,6 @@
+ "\\.ac\\.ae$" = "whois.aeda.net.ae";
+ "\\.mil\\.ae$" = "whois.aeda.net.ae";
+ "\\.gov\\.ae$" = "whois.aeda.net.ae";
+- "\\.1\\.7\\.9\\.e164\\.arpa$" = "whois.aeda.net.ae";
+ "\\.aero$" = "whois.aero";
+ "\\.af$" = "whois.cocca.cx";
+ "\\.ag$" = "whois.nic.ag";
+@@ -192,7 +191,7 @@
+ }
+ "\\.dm$" = "whois.nic.dm";
+ "\\.do$" = "whois.nic.do";
+- "\\.dz$" = "www.nic.dz";
++ "\\.dz$" = "whois.nic.dz";
+ "\\.ec$" = "www.nic.ec";
+ "\\.edu$" = "whois.educause.edu";
+ "\\.ee$" = "whois.eenet.ee";
+@@ -243,7 +242,7 @@
+ "\\.kp$" = "whois.kcce.kp";
+ "\\.kg$" = "whois.domain.kg";
+ "\\.ki$" = "whois.cocca.cx";
+- "\\.kr$" = "whois.krnic.net";
++ "\\.kr$" = "whois.kr";
+ "\\.kz$" = "whois.nic.kz";
+ "\\.la$" = "whois.nic.la";
+ "\\.lb$" = "cgi.aub.edu.lb";
+@@ -292,13 +291,14 @@
+ "\\.pm$" = "whois.nic.pm";
+ "\\.pr$" = "whois.nic.pr";
+ "\\.pro$" = "whois.registrypro.pro";
+- "\\.ps$" = "www.nic.ps";
++ "\\.ps$" = "whois.pnina.ps";
+ "\\.pt$" = "whois.dns.pt";
+ "\\.pw$" = "whois.nic.pw";
+ "\\.re$" = "whois.nic.re";
+ "\\.ro$" = "whois.rotld.ro";
++ "\\.rs$" = "whois.rnids.rs";
+ "\\.edu\.ru$" = "whois.informika.ru";
+- "\\.ru$" = "whois.ripn.net";
++ "\\.ru$" = "whois.tcinet.ru";
+ "\\.rw$" = "www.nic.rw";
+ "\\.sa$" = "saudinic.net.sa";
+ "\\.sb$" = "whois.nic.sb";
+@@ -317,6 +317,7 @@
+ "\\.st$" = "whois.nic.st";
+ "\\.su$" = "whois.ripn.net";
+ "\\.sv$" = "www.svnet.org.sv";
++ "\\.sy$" = "whois.tld.sy";
+ "\\.tc$" = "whois.adamsnames.tc";
+ "\\.tel$" = "whois.nic.tel";
+ "\\.tf$" = "whois.afnic.fr";
+@@ -335,7 +336,7 @@
+ whois-server = "tvwhois.verisign-grs.com";
+ query-format = "domain $*";
+ }
+- "\\.tw$" = "whois.twnic.net";
++ "\\.tw$" = "whois.twnic.net.tw";
+ "\\.ua$" = "whois.com.ua";
+ "\\.ug$" = "whois.co.ug";
+ "\\.ac\\.uk$" = "whois.ja.net";
+@@ -357,9 +358,25 @@
+ "\\.vu$" = "www.vunic.vu";
+ "\\.wf$" = "whois.nic.wf";
+ "\\.ws$" = "whois.worldsite.ws";
++ "\\.xn--3e0b707e$" = "whois.kr";
++ "\\.xn--90a3ac$" = "whois.rnids.rs";
++ "\\.xn--clchc0ea0b2g2a9gcd$" = "whois.sgnic.sg";
++ "\\.xn--fiqs8s$" = "cwhois.cnnic.cn";
++ "\\.xn--fiqz9s$" = "cwhois.cnnic.cn";
++ "\\.xn--fzc2c9e2c$" = "whois.nic.lk";
++ "\\.xn--j6w193g$" = "whois.hkirc.hk";
++ "\\.xn--kprw13d$" = "whois.twnic.net.tw";
++ "\\.xn--kpry57d$" = "whois.twnic.net.tw";
++ "\\.xn--lgbbat1ad8j$" = "whois.nic.dz";
+ "\\.xn--mgbaam7a8h$" = "whois.aeda.net.ae";
++ "\\.xn--mgberp4a5d4ar$" = "whois.nic.net.sa";
++ "\\.xn--o3cw4h$" = "whois.thnic.co.th";
++ "\\.xn--ogbpf8fl$" = "whois.tld.sy";
++ "\\.xn--p1ai$" = "whois.tcinet.ru";
++ "\\.xn--xkc2al3hye2a$" = "whois.nic.lk";
++ "\\.xn--yfro4i67o$" = "whois.sgnic.sg";
++ "\\.xn--ygbi2ammx$" = "whois.pnina.ps";
+ "\\.yt$" = "whois.nic.yt";
+- "\\.yu$" = "www.nic.yu";
+ "\\.ac\\.za$" = "whois.ac.za";
+ "\\.org\\.za$" = "rwhois.org.za 4321";
+ "\\.co\\.za$" = "whois.co.za";
+@@ -389,6 +406,7 @@
+
+ "\\.9\\.4\\.e164\\.arpa$" = "whois.enum.denic.de";
+ "\\.1\\.6\\.e164\\.arpa$" = "whois-check.enum.com.au";
++ "\\.1\\.7\\.9\\.e164\\.arpa$" = "whois.aeda.net.ae";
+ }
+
+ #
+@@ -1095,20 +1113,6 @@
+ form-element = "nombre_d";
+ }
+
+- "www\\.nic\\.dz" {
+- http = "true";
+- http-method = "POST";
+- http-action = "/index.php?option=com_content&task=view&id=37&Itemid=51";
+- form-element = "domain_name";
+- }
+-
+- "www\\.nic\\.yu" {
+- http = "true";
+- http-method = "GET";
+- http-action = "/cgi-bin/checkavail.cgi";
+- form-element = "domain";
+- }
+-
+ "whois\\.dotster\\.com" {
+ answer-charset = "UTF-8";
+ }
+@@ -1127,13 +1131,6 @@
+ form-element = "domsrch";
+ }
+
+- "www\\.nic\\.ps" {
+- http = "true";
+- http-method = "GET";
+- http-action = "/whois/domain_whois.php";
+- form-element = "dname";
+- }
+-
+ "www\\.svnet\\.org\\.sv" {
+ http = "true";
+ http-method = "POST";
+@@ -1179,6 +1176,26 @@
+ "whois\\.1api\\.net" {
+ answer-charset = "UTF-8";
+ }
++
++ "whois\\.kr" {
++ answer-charset = "EUC-KR";
++ }
++
++ "whois\\.nic\\.or\\.kr" {
++ answer-charset = "EUC-KR";
++ }
++
++ "whois\\.nic\\.dz" {
++ answer-charset = "UTF-8";
++ }
++
++ "whois\\.nic\\.lk" {
++ answer-charset = "ISO-8859-11";
++ }
++
++ "whois\\.iana\\.org" {
++ answer-charset = "UTF-8";
++ }
+ }
+
+ #
--- /dev/null
+This fixes somewhat reversed logic of trying to connect to WHOIS server.
+Tue Nov 20 2007, Lubomir Kundrak <lkundrak@redhat.com>
+
+--- jwhois-4.0/src/utils.c.connect 2007-06-26 09:00:20.000000000 +0200
++++ jwhois-4.0/src/utils.c 2007-11-20 17:05:33.000000000 +0100
+@@ -247,7 +247,7 @@ make_connect(const char *host, int port)
+ {
+ return -1;
+ }
+- while (res)
++ for (; res; res = res->ai_next)
+ {
+ sa = res->ai_addr;
+ sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
+@@ -266,15 +266,15 @@ make_connect(const char *host, int port)
+ flags = fcntl(sockfd, F_GETFL, 0);
+ if (fcntl(sockfd, F_SETFL, flags|O_NONBLOCK) == -1)
+ {
++ close (sockfd);
+ return -1;
+ }
+
+-
+ error = connect(sockfd, res->ai_addr, res->ai_addrlen);
+-
+ if (error < 0 && errno != EINPROGRESS)
+ {
+- break;
++ close (sockfd);
++ continue;
+ }
+
+ FD_ZERO(&fdset);
+@@ -283,18 +283,20 @@ make_connect(const char *host, int port)
+ error = select(FD_SETSIZE, NULL, &fdset, NULL, &timeout);
+ if (error == 0)
+ {
+- break;
++ close (sockfd);
++ return -1;
+ }
+
+ retlen = sizeof(retval);
+ error = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &retval, &retlen);
+ if (error < 0 || retval)
+ {
+- break;
++ close (sockfd);
++ return -1;
+ }
+- res = res->ai_next;
++
++ break;
+ }
+- if (error < 0 || retval) return -1;
+ #endif
+
+ return sockfd;
--- /dev/null
+diff -up jwhois-4.0/src/init.c_old jwhois-4.0/src/init.c
+--- jwhois-4.0/src/init.c_old 2007-06-26 08:59:17.000000000 +0200
++++ jwhois-4.0/src/init.c 2009-01-27 15:49:35.000000000 +0100
+@@ -283,6 +283,8 @@ parse_args(int *argc, char ***argv)
+ if (in)
+ jconfig_parse_file(in);
+
++ fclose(in);
++
+ if (verbose>1)
+ {
+ printf("[Debug: Cache = %s]\n", cache?"On":"Off");
--- /dev/null
+diff -up jwhois-4.0/src/jwhois.c.orig jwhois-4.0/src/jwhois.c
+--- jwhois-4.0/src/jwhois.c.orig 2007-06-26 08:59:35.000000000 +0200
++++ jwhois-4.0/src/jwhois.c 2011-05-24 12:29:37.398892451 +0200
+@@ -98,7 +98,7 @@ main(int argc, char **argv)
+
+ /* Parse remaining arguments and place them into the wq
+ structure. */
+- while (optind < argc)
++ while (optind < argc-1)
+ {
+ count += strlen(argv[optind])+1;
+ if (!qstring)
+@@ -116,19 +116,25 @@ main(int argc, char **argv)
+ strcat(qstring, " ");
+ optind++;
+ }
+- qstring[strlen(qstring)-1] = '\0';
+ #ifdef LIBIDN
+- rc = idna_to_ascii_lz(qstring, &idn, 0);
++ rc = idna_to_ascii_lz(argv[optind], &idn, 0);
+ if (rc != IDNA_SUCCESS)
+ {
+- printf("[IDN encoding of '%s' failed with error code %d]\n", qstring, rc);
++ printf("[IDN encoding of '%s' failed with error code %d]\n", argv[optind], rc);
+ exit(1);
+ }
+- wq.query = strdup(idn);
++ qstring = realloc(qstring, count+strlen(idn)+1);
++ memcpy(qstring+count,
++ idn,
++ strlen(idn)+1);
+ free(idn);
+ #else
+- wq.query = qstring;
++ qstring = realloc(qstring, count+strlen(argv[optind])+1);
++ memcpy(qstring+count,
++ argv[optind],
++ strlen(argv[optind])+1);
+ #endif
++ wq.query = qstring;
+
+ if (ghost)
+ {
--- /dev/null
+When IPv6 address mask did not end on an octed boundary, the the opposite
+part of last byte of host address was taken into account when a match was
+attempted. -- Lubomir Kundrak <lkundrak@redhat.com>
+
+--- jwhois-4.0/src/lookup.c.ipv6-match 2007-12-04 17:09:57.000000000 +0100
++++ jwhois-4.0/src/lookup.c 2007-12-04 17:10:20.000000000 +0100
+@@ -149,7 +149,7 @@ static int ipv6_address_is_in_network(co
+ }
+ /* i == bits / 8 */
+ if (bits % 8 != 0
+- && (addr->s6_addr[i] & (0xFFu << (bits % 8))) != net->s6_addr[i])
++ && (addr->s6_addr[i] & (0xFFu << 8-(bits % 8))) != net->s6_addr[i])
+ return 0;
+ return 1;
+ }
--- /dev/null
+diff -up jwhois-4.0/src/utils.c.orig jwhois-4.0/src/utils.c
+--- jwhois-4.0/src/utils.c.orig 2010-09-29 16:19:24.453608330 +0200
++++ jwhois-4.0/src/utils.c 2010-09-29 16:20:10.686608189 +0200
+@@ -292,7 +292,10 @@ make_connect(const char *host, int port)
+ if (error < 0 || retval)
+ {
+ close (sockfd);
+- return -1;
++ if (retval == ENETUNREACH)
++ continue;
++ else
++ return -1;
+ }
+
+ break;
--- /dev/null
+diff -ur jwhois-4.0.old/src/whois.c jwhois-4.0/src/whois.c
+--- jwhois-4.0.old/src/whois.c 2007-06-26 03:00:29.000000000 -0400
++++ jwhois-4.0/src/whois.c 2009-04-29 11:42:56.000000000 -0400
+@@ -115,6 +115,7 @@
+ unsigned int count, start_count;
+ int ret;
+ char data[MAXBUFSIZE];
++ fd_set rfds;
+
+ count = 0;
+
+@@ -124,7 +125,15 @@
+
+ do
+ {
++ FD_ZERO(&rfds);
++ FD_SET(fd, &rfds);
++ ret = select(fd + 1, &rfds, NULL, NULL, NULL);
++
++ if (ret <= 0)
++ return -1;
++
+ ret = read(fd, data, MAXBUFSIZE-1);
++
+ if (ret >= 0)
+ {
+ count += ret;