wpa_supplicant_4.5.6 mit NdisWrapper Installationsfehler

Butzelmann

Well-Known Member
Hi!

Ich moehcte wpa_supplicant 4.5.6 mit dem NdisWrapper Driver installieren.

Wenn ich dann gmake ausführe, bekomme ich folgendes:

cc -MMD -O2 -Wall -g -I. -I../utils -I../hostapd -I%%LOCALBASE%%/include -DCONFIG_DRIVER_NDISWRAPPER -DCONFIG_DRIVER_BSD -DUSE_DNET_PCAP -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_OTP -DEAP_SIM -DEAP_LEAP -DEAP_PSK -DEAP_AKA -DEAP_TLV -DIEEE8021X_EAPOL -DEAP_TLS_FUNCS -DCONFIG_WIRELESS_EXTENSION -DCONFIG_CTRL_IFACE -c -o driver_ndiswrapper.o driver_ndiswrapper.c
In file included from driver_ndiswrapper.c:22:
/usr/include/net/if_arp.h:88: error: field `arp_pa' has incomplete type
/usr/include/net/if_arp.h:89: error: field `arp_ha' has incomplete type
In file included from wireless_copy.h:88,
from driver_ndiswrapper.c:24:
/usr/include/net/if.h:265: error: field `ifru_addr' has incomplete type
/usr/include/net/if.h:266: error: field `ifru_dstaddr' has incomplete type
/usr/include/net/if.h:267: error: field `ifru_broadaddr' has incomplete type
/usr/include/net/if.h:299: error: field `ifra_addr' has incomplete type
/usr/include/net/if.h:300: error: field `ifra_broadaddr' has incomplete type
/usr/include/net/if.h:301: error: field `ifra_mask' has incomplete type
/usr/include/net/if.h:359: error: field `addr' has incomplete type
/usr/include/net/if.h:360: error: field `dstaddr' has incomplete type
In file included from driver_ndiswrapper.c:24:
wireless_copy.h:727: error: field `addr' has incomplete type
wireless_copy.h:753: error: field `bssid' has incomplete type
wireless_copy.h:811: error: field `addr' has incomplete type
wireless_copy.h:824: error: field `addr' has incomplete type
wireless_copy.h:837: error: field `bssid' has incomplete type
wireless_copy.h:845: error: field `src_addr' has incomplete type
wireless_copy.h:856: error: field `bssid' has incomplete type
wireless_copy.h:910: error: field `ap_addr' has incomplete type
wireless_copy.h:911: error: field `addr' has incomplete type
In file included from driver_ndiswrapper.c:29:
priv_netlink.h:53: error: syntax error before "sa_family_t"
driver_ndiswrapper.c: In function `get_socket':
driver_ndiswrapper.c:79: error: `AF_INET' undeclared (first use in this function)
driver_ndiswrapper.c:79: error: (Each undeclared identifier is reported only once
driver_ndiswrapper.c:79: error: for each function it appears in.)
driver_ndiswrapper.c:79: error: initializer element is not constant
driver_ndiswrapper.c:79: error: (near initialization for `families[0]')
driver_ndiswrapper.c:79: error: `AF_IPX' undeclared (first use in this function)
driver_ndiswrapper.c:79: error: initializer element is not constant
driver_ndiswrapper.c:79: error: (near initialization for `families[1]')
driver_ndiswrapper.c:79: error: `AF_AX25' undeclared (first use in this function)
driver_ndiswrapper.c:79: error: initializer element is not constant
driver_ndiswrapper.c:79: error: (near initialization for `families[2]')
driver_ndiswrapper.c:80: error: `AF_APPLETALK' undeclared (first use in this function)
driver_ndiswrapper.c:80: error: initializer element is not constant
driver_ndiswrapper.c:80: error: (near initialization for `families[3]')
driver_ndiswrapper.c:85: warning: implicit declaration of function `socket'
driver_ndiswrapper.c:85: error: `SOCK_DGRAM' undeclared (first use in this function)
driver_ndiswrapper.c: In function `iw_set_ext':
driver_ndiswrapper.c:96: error: structure has no member named `ifr_name'
gmake: *** [driver_ndiswrapper.o] Error 1


was mache ich falsch? Gruß und Danke!
 
zu wenig informationen geben und wpa_supplicant nicht aus dem base nehmen.

wpa_supplicant funktioniert NUR mit freebsd 6.0 oder höher.

ausserdem ist wpa_supplicant bei 6.0 schon im base-system.
 
Hallo...

Sorry das ich das vergass. Habe FreeBSD 6 installiert. Ich habe mit dm wpa_supplicant aus dem BaseSystem auch schon seid 3 Wochen genug geprobt und bekomme keine Verbindung zum AP. Ich will unbedingt WPA-PSK machen.

Im BaseSystem ist meiner Meinung nach wpa_supplicant 3.9.* standard und es ist auch so installiert, das man beispielsweise nicht NdisWrapper mit der -D - Option angeben kann.

Deshalb wollte ich nun wpa_supplicant 4.5.6 selbst installieren und in der .config - Datein auch angeben, dass NdisWrapper auch gehen soll.

Das Listing oben zeigt nun das Ergebnis dieses Installationsversuches. Kann mir bitte jemand sagen, was eventuell fehlt oder im System vorbereitend noch getan werden muesste?

Danke und Gruss!
 
Ich kann nur sagen, das wpa_supplicant bei mir zwar eine Verbindung herstellt, aber dhclient über diese nicht an den DHCP kommt.

Ich habe mein altes Skript das ich für 5.x geschrieben habe angepasst. Damit funktioniert's.
 
[LoN]Kamikaze schrieb:
Ich kann nur sagen, das wpa_supplicant bei mir zwar eine Verbindung herstellt, aber dhclient über diese nicht an den DHCP kommt.

Ich habe mein altes Skript das ich für 5.x geschrieben habe angepasst. Damit funktioniert's.

könnten wir das skript vielleicht mal sehen? Bei mir läuft WPA-PSK im heimischen Wlan problemlos. Mit WEP-EAP an der Uni kann mich zwar authentifizieren, kriege dann aber keine DHCP leases.
 
Das Skript kann natürlich kein WPA, da es ohne wpa_supplicant auskommt. Ich benutze es lediglich weil dhclient nicht mit wpa_supplicant funktioniert und weil ich nicht weiß wie ich wpa_supplicant dazu bewege vpnc zu starten.

Das Skript:

/usr/local/sbin/wi
Code:
#!/bin/sh

# Author:       kamikaze
# Contact:      LoN_Kamikaze@gmx.de

#
# Please read the comments in /usr/local/etc/rc.d/wi.sh if you
# require documentation.
#

# The desired action.
command=$1

# The error number to return.
error=0

# The path for the network init scripts.
network_scripts="/usr/local/etc/wi.conf"

# Network profile.
network_profile="/var/run/wi"

# Scan results.
network_scan="/var/run/networks"

# Default settings.
wi_enable="NO"
wi_module=""
wi_device=""
wi_loadfirmware=""

# Get settings from rc.conf.
. /etc/rc.subr

name="wi"
rcvar=`set_rcvar`

load_rc_config $name

# Check if the wi service is enabled.
if [ "$wi_enable" = "NO" ]; then
        echo "wi_$command:	The wi service is not enabled."
        exit 1
fi

# Check if a device has been defined.
if [ "$wi_device" = "" ]; then
	echo "wi_$command:	No device has been configured for the wiinit service."
	exit 1
fi

wi_start()
{
	# Check weather the device is already up.
	/sbin/ifconfig | grep  $wi_device > /dev/null
	if [ $? -eq 0 ]; then
		wi_stop
	fi

	if [ "$wi_module" ]; then
		echo "wi_$command:	Load kernel module for wireless network device."
		/sbin/kldload $wi_module 2> /dev/null > /dev/null
		$wi_loadfirmware
	fi

	# Find networks.
	echo "wi_$command:	Searching for wireless networks."
	/sbin/ifconfig $wi_device up
	networks=$(/sbin/ifconfig $wi_device scan | grep -v SSID | grep -Eo "^[[:alnum:]]+" )

	# Save scan results.
	echo "$networks" > $network_scan

	# Practically wicontrol returns networks
	# in the order of their signal quality.
	for network in $networks; do
		script=$(cat "$network_scripts/$network" 2> /dev/null)
		if [ $? -eq 0 ]; then
			echo "wi_$command:	Run init script for $network."
			# Select the access point.
			/sbin/ifconfig $wi_device ssid $network

			# Try to execute the start script.
			echo "device=$wi_device; ssid=$network; $script" | /bin/sh
			if [ $? -eq 1 ]; then
				echo "wi_$command:	Init script $network failed."
				continue
			fi

			echo $network > $network_profile
			echo "wi_$command:	Done."
			break
		fi
	done

	# Check weather any networks have been found.
	if [ "$networks" = "" ]; then
		echo "wi_$command:	No wireless networks have been found."
		error=1
	fi

	# Finding a network did not succeed.
	if [ $error -eq 1 ]; then
		wi_stop
	fi
}

wi_stop()
{
	# Get the current profile.
	network=$(cat $network_profile 2> /dev/null)

	if [ $? -eq 0 ]; then
		script=$(cat "$network_scripts/${network}_stop" 2> /dev/null)
		if [ $? -eq 0 ]; then
			echo "wi_$command:	Run deactivation script for $network."
			echo "$script" | /bin/sh
		fi
	fi

	# Check if the device is running and shut it down.
	/sbin/ifconfig $wi_device | grep UP | grep RUNNING 2> /dev/null > /dev/null
	if [ $? -eq 0 ]; then
		echo "wi_$command:	Shuting down $wi_device."
		/sbin/ifconfig $wi_device down
	fi

	# Check if the kernel module is loaded and unload it.
	/sbin/kldstat -n $wi_module 2> /dev/null > /dev/null
	if [ $? -eq 0 ]; then
		echo "wi_$command:	Unloading $wi_module kernel module."
		/sbin/kldunload $wi_module
	fi

	# Remove the profile record.
	/bin/rm $network_profile 2> /dev/null > /dev/null
}

wi_status()
{
	# Check weather a wireless network is configured.
	network=$(cat /var/run/wi 2> /dev/null)
	
	if [ $? -eq 1 ]; then
		echo "wi_$command:	Not connected."
	else
		echo "wi_$command:	profile: $network"
		status=$(/sbin/ifconfig $wi_device | grep status)
		echo "wi_$command:$status"
	fi

	echo "wi_$command:	Available networks:"
	cat $network_scan 2> /dev/null
}

wi_bind()
{
	/bin/sleep 2

	status=$(/sbin/ifconfig $wi_device | grep status | grep -o associated )
	# Bind connection if already established
	if [ "$status" = "associated" ]; then
		bssid=$(/sbin/ifconfig $wi_device | grep bssid | grep -Eo "[0-9a-f:]{17}" )
		echo "wi_$command:	Bind connection to bssid $bssid."
		/sbin/ifconfig $wi_device bssid $bssid
	else
		echo "wi_$command:	Binding failed, the device is not associated to an AP."
		error=1
	fi
}

# Run desired command.
wi_$command

exit $error

/usr/local/etc/rc.d/wi.sh
Code:
#!/bin/sh

# Author:	kamikaze
# Contact:	LoN_Kamikaze@gmx.de

# PROVIDE: wi
# BEFORE: securelevel
# REQUIRE: NETWORKING
# KEYWORD: FreeBSD

#
# Add the following lines to /etc/rc.conf to enable wireless detection.
# wi_enable (bool):		Set to "NO" by default.
#				Set it to "YES" to enable wireless detection.
# wi_device (string):		The name of the wireless network device.
#				This option is required to run wi.
# wi_module (string):		The name of the kernel module for the device.
#				Leave this empty if you don't want wi to manage
#				the loading/unloading of the device driver.
# wi_loadfirmware (string):	Some wireless devices require the seperate
#				loading of a firmware. Here you can specify
#				the command to do this. It will only be
#				executed in case the kernel module for the
#				device gets loaded.
#
# To use the wireless detection during runtime you can use the commands
# wi start
# wi stop
# wi status
#

wi_enable="NO"
wi_device=""
wi_module=""
wi_loadfirmware=""

. /etc/rc.subr

name="wi"
rcvar=`set_rcvar`

load_rc_config $name

command="/usr/local/sbin/wi"
start_cmd="$command $1"
stop_cmd="$command $1"
status_cmd="$command $1"

run_rc_command "$1" &

Konfiguration:

/etc/rc.conf
Code:
# wireless network
wi_enable="YES"
wi_device="ipw0"
wi_module="if_ipw"
wi_loadfirmware="/usr/sbin/ipwcontrol -i ipw0 -f /usr/local/share/ipw-firmware/ipw.fw 2> /dev/null > /dev/null"

Beispiel Verbindung UNI:

/usr/local/etc/wi.conf/hrz
Code:
/usr/local/sbin/wi bind
/sbin/dhclient $device
/usr/local/sbin/vpnc /usr/local/etc/vpnc/tud.conf
/sbin/ping -i 12 www.tu-darmstadt.de 2> /dev/null > /dev/null &
/usr/bin/pgrep -f "/sbin/ping -i 12 www.tu-darmstadt.de" > /var/run/tudping.pid

/usr/local/etc/wi.conf/hrz_stop
Code:
/usr/local/sbin/vpnc-disconnect
/bin/kill $(cat /var/run/tudping.pid)

Beispiel zu Hause mit WEP:

/usr/local/etc/wi.conf/nightmare
Code:
/sbin/ifconfig $device wepkey 0x000102030405060708090a0b0c weptxkey 1 wepmode on
/usr/local/sbin/wi bind
/sbin/dhclient $device
 
Ich will ja nun unbedingt zu Hause das WPA-PSK zum laufen bekommen.
Leider schaffe ich es nicht mit dem wpa_supplicant in FreeBSD 6.0 RC1...

Ic habe als WLAN-Router das Siemens SX541.
Ich habe auch diverse WLAN-Karten PCMCIA Karten probiert.
Habe einmal eine Cisco AIRONET 350 series; eine Intersil PRISM mit Prism 2.5 chipset oder eben eine ARtem OnAir ComCard 11.

Leider geht es mit keiner.

Ich weiss, dass der Router in seinen Signalen keine BSSID mitsendet, so dass dort sowas wie eine 00:00:00:00:00 steht...

Zum verzeweifeln...

Als noch Windoof auf dem Notebook war ging WPA-PSK mit den Karten.

Ich will es nun abe runbedingt auch mit FreeBSD schaffen.

Hat noch jemand Tipps?

Danke und Gruß
 
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2
network={
ssid="ssidvonwlan"
psk="schluesselvonwlan"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
}
 
So es hat mir gereicht!

Ich habe mir eine sechste Karte gekauft :) D-LINK -G650, da diese den Atheros Chipsatz hat. Nun geht WPA-PSK und ich bin zufrieden!

Gruss!
 
Zurück
Oben