improxy icon indicating copy to clipboard operation
improxy copied to clipboard

enhncments suggestions

Open Yuji-2022 opened this issue 8 years ago • 1 comments

Hello and thank you for this igmp/mld proxy code I run some static code analysis on it and I would like to share somes results with you

  1. input.c mcast_recv_igmp() => unreachable code : else if (ip->protocol == 0)
  2. proxy.c main() => unreachable code : free_resource(); I think the proxy need to handle system signal in order to cleanup ressources
  3. output.c send_igmp_mld_query() => unreachable code : if(p_if == NULL) (line 84)
  4. proxy.c load_config() => resource lost : need to close fd
  5. output.c send_igmp_mld_query() => possible memory leak : p = malloc(max_len) if family is neither AF_INET nor AF_INET6

I hope it help Best Reagrds

Yuji-2022 avatar May 08 '17 12:05 Yuji-2022

Hello and thank you for this igmp/mld proxy code I run some static code analysis on it and I would like to share somes results with you

  1. input.c mcast_recv_igmp() => unreachable code : else if (ip->protocol == 0)
  2. proxy.c main() => unreachable code : free_resource(); I think the proxy need to handle system signal in order to cleanup ressources
  3. output.c send_igmp_mld_query() => unreachable code : if(p_if == NULL) (line 84)
  4. proxy.c load_config() => resource lost : need to close fd
  5. output.c send_igmp_mld_query() => possible memory leak : p = malloc(max_len) if family is neither AF_INET nor AF_INET6

I hope it help Best Reagrds

Hello and thank you for this igmp/mld proxy code I run some static code analysis on it and I would like to share somes results with you

  1. input.c mcast_recv_igmp() => unreachable code : else if (ip->protocol == 0)
  2. proxy.c main() => unreachable code : free_resource(); I think the proxy need to handle system signal in order to cleanup ressources
  3. output.c send_igmp_mld_query() => unreachable code : if(p_if == NULL) (line 84)
  4. proxy.c load_config() => resource lost : need to close fd
  5. output.c send_igmp_mld_query() => possible memory leak : p = malloc(max_len) if family is neither AF_INET nor AF_INET6

I hope it help Best Reagrds

Hello, I don't understant why it's (ip->protocol == 0) to add the mfc

zhujiayin avatar Feb 22 '22 14:02 zhujiayin