I created a request using scapy. It works fine with my eth0 interface. I send a message to the discoverer and i get an offer. But it doesn't work through the wlan0 interface, when I connect to it via wifi and try to send a packet. Why is this happening ? How to fix it ?
from scapy.all import *
conf.checkIPaddr = False
dhcp_discover = Ether(dst='ff:ff:ff:ff:ff:ff',src=RandMAC()) \
/IP(src='0.0.0.0',dst='255.255.255.255') \
/UDP(sport=68,dport=67) \
/BOOTP(op=1, chaddr=RandMAC()) \
/DHCP(options=[('message-type','discover'),('end')])
#sendp(dhcp_discover,iface='eth0') # Ok
sendp(dhcp_discover,iface='wlan0') # not working