Uploaded image for project: 'l2switch'
  1. l2switch
  2. L2SWITCH-57

NullPointerException in HostTracker.java

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • unspecified
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 4983
    • Low

    Description

      Two buggy sites may raise NullPointerException in HostTracker module if concurrent remove operation occurs.

      The first case is for "transHost" variable, if a concurrent remove upon "hostsDB" variable. The corresponding snippets are attached:

      HostNodeConnector transHost = hostsDB.get(networkAddr);
      transHost.setStaticHost(true);

      The second case is for "existinghost" variable. The following are snippets:

      HostNodeConnector existinghost = hostsDB.get(id);
      existinghost.initArpSendCountDown();

      To solve the issue, the simplest way is to add a null checker for these variable since we cannot guarantee the result from hostsDB is not NULL.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            x.rayyle@gmail.com lei xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: