author | mjm <mjm> | 2002-12-28 12:59:38 (UTC) |
---|---|---|
committer | mjm <mjm> | 2002-12-28 12:59:38 (UTC) |
commit | 1adf0d153cd8c4714719183af45ed703abef0a43 (patch) (side-by-side diff) | |
tree | 8845f1bbee4d050a18a6e5fa970bb5adaa277bc0 /noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | |
parent | 7a6a55d19048de7920eb885e80a26e1bef0f66e4 (diff) | |
download | opie-1adf0d153cd8c4714719183af45ed703abef0a43.zip opie-1adf0d153cd8c4714719183af45ed703abef0a43.tar.gz opie-1adf0d153cd8c4714719183af45ed703abef0a43.tar.bz2 |
cleanup
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc index c29f4d0..7362f14 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/cardmode.cc @@ -20,7 +20,7 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) return 0; } - /* Setting the prmiscous and up flag to the interface */ + /* Setting the promiscous and up flag to the interface */ if (!card_set_promisc_up(device)) { wl_logerr("Cannot set interface to promisc mode: %s", strerror(errno)); @@ -64,14 +64,11 @@ int card_into_monitormode (pcap_t **orighandle, char *device, int cardtype) /* Set card into promisc mode */ int card_set_promisc_up (const char *device) { - char ifconfigcmd[32]; + char ifconfigcmd[48]; int retval=0; snprintf(ifconfigcmd, sizeof(ifconfigcmd) - 1, SBIN_PATH, device); retval = system(ifconfigcmd); - if(retval != 0) - return 0; - -return 1; + return (retval ? 0 : 1); } |