Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use predefined constants #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/3com.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ uint32_t eth_cycle_count;
extern int ld_die_rq;

// Linux tuntap interface
char ether_iface[30] = "ldtap";
char ether_iface[IFNAMSIZ] = "ldtap";
unsigned char ether_addr[6] = {0x00,0x02,0x9C,0x55,0x89,0xC6};
int pkt_count = 0;
int ether_fd = -1;
Expand Down Expand Up @@ -186,7 +186,7 @@ uint32_t ether_rx_pkt(){
#if !defined (USES_ETHER_CODE) && defined (HAVE_NET_BPF_H)
#define USES_ETHER_CODE "BPF"

char ether_bpfn[64];
char ether_bpfn[PATH_MAX];
#ifdef USE_UTUN
// For tunnel frame diverter hack
char guest_ip_addr[32] = "";
Expand Down Expand Up @@ -979,7 +979,7 @@ int yaml_network_mapping_loop(yaml_parser_t *parser){
}else{
strncpy(value,(const char *)event.data.scalar.value,128);
if(strcmp(key,"interface") == 0){
strncpy(ether_iface,value,30);
strncpy(ether_iface,value,sizeof(ether_iface));
logmsgf(LT_3COM,0,"Using 3Com Ethernet interface %s\n",ether_iface);
goto value_done;
}
Expand Down
Loading