code: func (IPSET *pfIPSET) initIPSet(ctx context.Context, db *sql.DB) {
  	logger := log.LoggerWContext(ctx)
  
  	IPSET.ListALL, _ = ipset.ListAll()
  	rows, err := db.Query("select distinct n.mac, i.ip, n.category_id as node_id from node as n left join locationlog as l on n.mac=l.mac left join ip4log as i on n.mac=i.mac where l.connection_type = \"inline\" and n.status=\"reg\" and n.mac=i.mac and i.end_time > NOW()")
  	if err != nil {
  		// Log here
  		logger.Error("Error while fetching the inline nodes in the database: " + err.Error())
  		return
  	}
  	defer rows.Close()
  	var (
  		IpStr  string
  		Mac    string
  		NodeId string
  	)
  	for rows.Next() {
  		err := rows.Scan(&Mac, &IpStr, &NodeId)
  		if err != nil {
  			// Log here
  			logger.Error(err.Error())
  			return
  		}
  		for k, v := range IPSET.Network {
  			if k.Contains(net.ParseIP(IpStr)) {
  				if v == "inlinel2" {
  					IPSET.IPSEThandleLayer2(ctx, IpStr, Mac, k.IP.String(), "Reg", NodeId)
  					IPSET.IPSEThandleMarkIpL2(ctx, IpStr, k.IP.String(), NodeId)
  				}
  				if v == "inlinel3" {
  					IPSET.IPSEThandleLayer3(ctx, IpStr, k.IP.String(), "Reg", NodeId)
  					IPSET.IPSEThandleMarkIpL3(ctx, IpStr, k.IP.String(), NodeId)
  				}
  				break
  			}
  		}
  	}
  }
docs: // initIPSet fetch the database to remove already assigned ip addresses